pub struct ModelInfo {
pub id: String,
pub name: Option<String>,
pub description: Option<String>,
}Expand description
Information about an available model from an LLM provider.
This struct is returned by LLMClient::list_models() to provide
information about models available through the provider’s API.
§Example
let client = OpenAIClient::from_env()?;
let models = client.list_models().await?;
for model in models {
println!("{}: {}", model.id, model.description.unwrap_or_default());
}Fields§
§id: StringThe model identifier used in API requests
name: Option<String>Human-readable display name (if different from id)
description: Option<String>Description of the model’s capabilities
Trait Implementations§
impl Eq for ModelInfo
impl StructuralPartialEq for ModelInfo
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnsafeUnpin for ModelInfo
impl UnwindSafe for ModelInfo
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