pub trait LanguageModelProvider {
type Model: LanguageModel;
// Required methods
fn list_models(&self) -> impl Future<Output = Vec<String>> + Send;
fn get_model(&self, name: &str) -> impl Future<Output = Self::Model> + Send;
fn profile() -> Profile;
}
Expand description
Trait for AI service providers that can list and provide language models.
Required Associated Types§
Sourcetype Model: LanguageModel
type Model: LanguageModel
The type of language model this provider creates.
Required Methods§
Sourcefn list_models(&self) -> impl Future<Output = Vec<String>> + Send
fn list_models(&self) -> impl Future<Output = Vec<String>> + Send
Lists all available models from this provider.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.