pub struct ApiLLMModel {
pub model_base: LLMModelBase,
pub cost_per_m_in_tokens: f32,
pub cost_per_m_out_tokens: f32,
pub tokens_per_message: u32,
pub tokens_per_name: Option<i32>,
}Fields§
§model_base: LLMModelBase§cost_per_m_in_tokens: f32§cost_per_m_out_tokens: f32§tokens_per_message: u32§tokens_per_name: Option<i32>Implementations§
Source§impl ApiLLMModel
impl ApiLLMModel
pub fn anthropic_model_from_model_id(model_id: &str) -> ApiLLMModel
pub fn claude_3_opus() -> ApiLLMModel
pub fn claude_3_sonnet() -> ApiLLMModel
pub fn claude_3_haiku() -> ApiLLMModel
pub fn claude_3_5_sonnet() -> ApiLLMModel
pub fn claude_3_7_sonnet() -> ApiLLMModel
pub fn claude<S: ToString>(model_id: S) -> ApiLLMModel
Source§impl ApiLLMModel
impl ApiLLMModel
pub fn openai_model_from_model_id(model_id: &str) -> ApiLLMModel
pub fn gpt_4() -> ApiLLMModel
pub fn gpt_4_32k() -> ApiLLMModel
pub fn gpt_4_turbo() -> ApiLLMModel
pub fn gpt_3_5_turbo() -> ApiLLMModel
pub fn gpt_4_o_mini() -> ApiLLMModel
pub fn gpt_4_o() -> ApiLLMModel
pub fn o1_mini() -> ApiLLMModel
pub fn o1_preview() -> ApiLLMModel
Source§impl ApiLLMModel
impl ApiLLMModel
pub fn perplexity_model_from_model_id(model_id: &str) -> ApiLLMModel
pub fn sonar_small() -> ApiLLMModel
pub fn sonar_large() -> ApiLLMModel
pub fn sonar_huge() -> ApiLLMModel
Trait Implementations§
Source§impl Clone for ApiLLMModel
impl Clone for ApiLLMModel
Source§fn clone(&self) -> ApiLLMModel
fn clone(&self) -> ApiLLMModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApiLLMModel
impl RefUnwindSafe for ApiLLMModel
impl Send for ApiLLMModel
impl Sync for ApiLLMModel
impl Unpin for ApiLLMModel
impl UnwindSafe for ApiLLMModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more