Skip to main content

ModelDiscovery

Trait ModelDiscovery 

Source
pub trait ModelDiscovery: Send + Sync {
    // Required methods
    fn provider_id(&self) -> &str;
    fn discover_models<'life0, 'life1, 'async_trait>(
        &'life0 self,
        api_key: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoveredModel>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for provider-specific model discovery.

Required Methods§

Source

fn provider_id(&self) -> &str

The provider ID this discovery implementation handles.

Source

fn discover_models<'life0, 'life1, 'async_trait>( &'life0 self, api_key: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoveredModel>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Discover available models from the provider.

Implementors§