Skip to main content

LlmModelAdapter

Trait LlmModelAdapter 

Source
pub trait LlmModelAdapter: Send + Sync {
    // Required methods
    fn model_id(&self) -> &str;
    fn provider_name(&self) -> &str;
    fn display_name(&self) -> &str;
    fn capabilities(&self) -> ModelCapabilities;
}
Expand description

Adapter for model-specific behavior and capabilities under a provider.

Separates model identity/capabilities from transport so that new models can be added without changing the provider client code.

Required Methods§

Source

fn model_id(&self) -> &str

Unique model identifier (e.g., “llama3.2:3b”, “gpt-4o”).

Source

fn provider_name(&self) -> &str

Provider name this model belongs to (e.g., “ollama”, “openai”).

Source

fn display_name(&self) -> &str

Human-readable display name.

Source

fn capabilities(&self) -> ModelCapabilities

Capability metadata for this model.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§