Documentation
¶
Overview ¶
Package wirerules is the table of upstreams that read the Chat Completions shape differently from OpenAI's definition, and the v1.WireRules each one needs, looked up by catalog host name or by the host part of a base URL. Relay's server and the SDK client both read it, so a call made through relay and one made straight to the upstream send the same bytes.
An upstream not listed gets zero rules: no prior reasoning is sent back, since some Chat Completions upstreams reject the field (Mistral answers 422). Out of scope: other wire shapes, applying the rules (a v1.WireRulesSerializer does that), and per-model rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatCompletionsByBaseURL ¶
ChatCompletionsByBaseURL returns the Chat Completions wire rules of the upstream whose host baseURL names (case-insensitive, any scheme, port or path); zero when the table has no row for it.
func ChatCompletionsByHostName ¶
ChatCompletionsByHostName returns the Chat Completions wire rules of the catalog host with metadata.name name; zero when the table has no row for it.
Types ¶
This section is empty.