pub enum Family {
Gpt,
Claude,
Gemini,
Llama,
Cohere,
}Expand description
Model family used to pick a chars-per-token ratio.
Variants§
Gpt
GPT-4 / GPT-5 / o3 / o4 (cl100k_base, o200k_base).
Claude
Anthropic Claude.
Gemini
Google Gemini.
Llama
Meta Llama 3.
Cohere
Cohere Command R / R+.
Implementations§
Source§impl Family
impl Family
Sourcepub fn chars_per_token(self) -> f64
pub fn chars_per_token(self) -> f64
Characters-per-token ratio for this family.
Sourcepub fn guess_from_model_id(id: &str) -> Self
pub fn guess_from_model_id(id: &str) -> Self
Best-effort guess from a model id string. Falls back to Gpt
when nothing matches.
Trait Implementations§
impl Copy for Family
impl Eq for Family
impl StructuralPartialEq for Family
Auto Trait Implementations§
impl Freeze for Family
impl RefUnwindSafe for Family
impl Send for Family
impl Sync for Family
impl Unpin for Family
impl UnsafeUnpin for Family
impl UnwindSafe for Family
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