pub struct ProviderMetadata {
pub name: String,
pub cost_per_million_input: f64,
pub cost_per_million_output: f64,
pub typical_latency_ms: u64,
pub supports_function_calling: bool,
pub supports_vision: bool,
pub supports_streaming: bool,
pub max_tokens: u32,
}Expand description
Provider metadata for selection
Fields§
§name: String§cost_per_million_input: f64§cost_per_million_output: f64§typical_latency_ms: u64§supports_function_calling: bool§supports_vision: bool§supports_streaming: bool§max_tokens: u32Implementations§
Source§impl ProviderMetadata
impl ProviderMetadata
Sourcepub fn openai_gpt4() -> Self
pub fn openai_gpt4() -> Self
OpenAI GPT-4 metadata
Sourcepub fn openai_gpt4o() -> Self
pub fn openai_gpt4o() -> Self
OpenAI GPT-4o metadata
Sourcepub fn openai_gpt4o_mini() -> Self
pub fn openai_gpt4o_mini() -> Self
OpenAI GPT-4o-mini metadata
Sourcepub fn openai_o1_preview() -> Self
pub fn openai_o1_preview() -> Self
OpenAI o1-preview metadata (reasoning model)
Sourcepub fn openai_o1_mini() -> Self
pub fn openai_o1_mini() -> Self
OpenAI o1-mini metadata (reasoning model)
Sourcepub fn openai_gpt35_turbo() -> Self
pub fn openai_gpt35_turbo() -> Self
OpenAI GPT-3.5 Turbo metadata
Sourcepub fn anthropic_claude3_opus() -> Self
pub fn anthropic_claude3_opus() -> Self
Anthropic Claude 3 Opus metadata
Sourcepub fn anthropic_claude35_sonnet() -> Self
pub fn anthropic_claude35_sonnet() -> Self
Anthropic Claude 3.5 Sonnet metadata (newer model)
Sourcepub fn anthropic_claude3_sonnet() -> Self
pub fn anthropic_claude3_sonnet() -> Self
Anthropic Claude 3 Sonnet metadata (original)
Sourcepub fn anthropic_claude35_haiku() -> Self
pub fn anthropic_claude35_haiku() -> Self
Anthropic Claude 3.5 Haiku metadata (newer model)
Sourcepub fn anthropic_claude3_haiku() -> Self
pub fn anthropic_claude3_haiku() -> Self
Anthropic Claude 3 Haiku metadata (original)
Sourcepub fn google_gemini_pro() -> Self
pub fn google_gemini_pro() -> Self
Google Gemini Pro metadata
Sourcepub fn google_gemini_flash() -> Self
pub fn google_gemini_flash() -> Self
Google Gemini Flash metadata (faster, cheaper)
Sourcepub fn ollama_local() -> Self
pub fn ollama_local() -> Self
Ollama (local) metadata
Trait Implementations§
Source§impl Clone for ProviderMetadata
impl Clone for ProviderMetadata
Source§fn clone(&self) -> ProviderMetadata
fn clone(&self) -> ProviderMetadata
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 ProviderMetadata
impl RefUnwindSafe for ProviderMetadata
impl Send for ProviderMetadata
impl Sync for ProviderMetadata
impl Unpin for ProviderMetadata
impl UnwindSafe for ProviderMetadata
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