pub enum Model {
Gpt4o,
Gpt4,
Gpt35Turbo,
Claude3Opus,
Claude3Sonnet,
Claude3Haiku,
CommandRPlus,
CommandR,
}Expand description
LLM model identifier.
Variants§
Gpt4o
OpenAI GPT-4o.
Gpt4
OpenAI GPT-4.
Gpt35Turbo
OpenAI GPT-3.5 Turbo.
Claude3Opus
Anthropic Claude 3 Opus.
Claude3Sonnet
Anthropic Claude 3 Sonnet.
Claude3Haiku
Anthropic Claude 3 Haiku.
CommandRPlus
Cohere Command R+.
CommandR
Cohere Command R.
Implementations§
Source§impl Model
impl Model
Sourcepub fn infer_from_name(name: &str) -> Option<(Provider, Self)>
pub fn infer_from_name(name: &str) -> Option<(Provider, Self)>
Infer the (Provider, Model) pair from a free-form model name string.
AAASM-3353 — the live CheckAction proto (LlmCallContext) carries only
the model name string; it does NOT carry a provider field. Rather than
change proto/ (out of scope), the provider is inferred here from the
model name. The match is a case-insensitive substring test against the
known model families, ordered most-specific-first so that e.g.
gpt-4o-2024-08-06 maps to Gpt4o (not Gpt4) and
command-r-plus maps to CommandRPlus (not CommandR).
Returns None for an unrecognised model name. Callers must decide how
to price an unknown model — the gateway budget stage fails closed at a
conservative fallback rate (AAASM-4069) rather than treating it as free.
Trait Implementations§
impl Copy for Model
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.