pub enum ProviderKind {
Openai,
Anthropic,
Google,
}Expand description
The wire protocols Ingot speaks.
Variants§
Openai
OpenAI Chat Completions. Spoken by OpenAI, Azure OpenAI, vLLM, llama.cpp, Ollama, LM Studio, and most hosted gateways.
Anthropic
The Anthropic Messages API. Spoken by Anthropic and by gateways that front it.
Google’s Generative Language API (Gemini).
Here because it is the one a service cannot reach by pretending to be something else: it is neither of the two above.
Implementations§
Source§impl ProviderKind
impl ProviderKind
pub fn as_str(self) -> &'static str
Sourcepub fn requires_authentication(self) -> bool
pub fn requires_authentication(self) -> bool
Whether every request this protocol makes carries a credential.
False only for openai, and only because a server on the same machine
usually wants no authentication at all. Asserted here rather than
rediscovered by each caller, so doctor and the provider builder cannot
disagree about whether a declaration is complete.
Sourcepub fn base_url_is_an_endpoint(self) -> bool
pub fn base_url_is_an_endpoint(self) -> bool
Whether base-url is a complete endpoint or the base to build one from.
Worth being explicit about rather than leaving to a reader of two provider modules: the Gemini protocol puts the model and the method in the path, so there is no one endpoint to name.
Trait Implementations§
Source§impl Clone for ProviderKind
impl Clone for ProviderKind
Source§fn clone(&self) -> ProviderKind
fn clone(&self) -> ProviderKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more