pub struct AiClientMetadata {
pub provider: String,
pub model: String,
pub max_context_length: usize,
pub max_response_length: usize,
pub active_beta: Option<(String, String)>,
}Expand description
Metadata about an AI client implementation.
Fields§
§provider: StringService provider name.
model: StringModel identifier.
max_context_length: usizeMaximum context length supported.
max_response_length: usizeMaximum token response length supported.
active_beta: Option<(String, String)>Active beta header, if any: (key, value).
Implementations§
Source§impl AiClientMetadata
impl AiClientMetadata
Sourcepub fn prompt_style(&self) -> PromptStyle
pub fn prompt_style(&self) -> PromptStyle
Derives the prompt style from the provider name.
Matches against the exact strings set by each AiClient implementation:
"OpenAI"and"Ollama"→PromptStyle::OpenAi"Anthropic"and"Anthropic Bedrock"→PromptStyle::Claude
Unrecognised provider strings default to PromptStyle::Claude.
Trait Implementations§
Source§impl Clone for AiClientMetadata
impl Clone for AiClientMetadata
Source§fn clone(&self) -> AiClientMetadata
fn clone(&self) -> AiClientMetadata
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 AiClientMetadata
impl RefUnwindSafe for AiClientMetadata
impl Send for AiClientMetadata
impl Sync for AiClientMetadata
impl Unpin for AiClientMetadata
impl UnsafeUnpin for AiClientMetadata
impl UnwindSafe for AiClientMetadata
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