pub enum ProviderKind {
OpenAI,
Anthropic,
OpenRouter,
OpenAICompatible,
}Expand description
Identifies which AI provider was used.
Variants§
OpenAI
OpenAI’s own API (https://api.openai.com).
Anthropic
Anthropic’s Messages API (https://api.anthropic.com).
OpenRouter
OpenRouter’s aggregating API (https://openrouter.ai).
OpenAICompatible
A self-hosted or third-party endpoint that speaks the OpenAI Chat Completions wire format, such as Ollama, vLLM, or LM Studio.
Unlike the other variants this one names no fixed service: the endpoint
is chosen per client with
ClientBuilder::openai_compatible_base_url.
Implementations§
Source§impl ProviderKind
impl ProviderKind
Sourcepub fn feature_name(&self) -> &'static str
pub fn feature_name(&self) -> &'static str
The Cargo feature that compiles support for this provider in.
ProviderKind::OpenAICompatible rides the openai feature, because it
reuses that provider’s request builder and stream parser, so this is not
simply the lowercased variant name.
Trait Implementations§
Source§impl Clone for ProviderKind
impl Clone for ProviderKind
Source§fn clone(&self) -> ProviderKind
fn clone(&self) -> ProviderKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProviderKind
Source§impl Debug for ProviderKind
impl Debug for ProviderKind
Source§impl<'de> Deserialize<'de> for ProviderKind
impl<'de> Deserialize<'de> for ProviderKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProviderKind
impl Display for ProviderKind
impl Eq for ProviderKind
Source§impl PartialEq for ProviderKind
impl PartialEq for ProviderKind
Source§impl Serialize for ProviderKind
impl Serialize for ProviderKind
impl StructuralPartialEq for ProviderKind
Auto Trait Implementations§
impl Freeze for ProviderKind
impl RefUnwindSafe for ProviderKind
impl Send for ProviderKind
impl Sync for ProviderKind
impl Unpin for ProviderKind
impl UnsafeUnpin for ProviderKind
impl UnwindSafe for ProviderKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.