Skip to main content

RealtimeSessionFactory

Trait RealtimeSessionFactory 

Source
pub trait RealtimeSessionFactory: Send + Sync {
    // Required methods
    fn capabilities(&self) -> RealtimeCapabilities;
    fn open_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        open_config: &'life1 RealtimeSessionOpenConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RealtimeSession>, LlmError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn attach_external_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 RealtimeExternalSessionTarget,
        turning_mode: RealtimeTurningMode,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RealtimeSession>, LlmError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Factory for provider-neutral realtime sessions.

Required Methods§

Source

fn capabilities(&self) -> RealtimeCapabilities

Report the provider/product capability set exposed by this factory.

Source

fn open_session<'life0, 'life1, 'async_trait>( &'life0 self, open_config: &'life1 RealtimeSessionOpenConfig, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RealtimeSession>, LlmError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Open a provider-created realtime session using the selected turning mode.

Source

fn attach_external_session<'life0, 'life1, 'async_trait>( &'life0 self, target: &'life1 RealtimeExternalSessionTarget, turning_mode: RealtimeTurningMode, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RealtimeSession>, LlmError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Attach to an existing provider-managed realtime session.

Implementors§