Skip to main content

ChatAdapter

Trait ChatAdapter 

Source
pub trait ChatAdapter: Send + Sync {
    // Required methods
    fn info(&self) -> AdapterInfo;
    fn chat<'life0, 'async_trait>(
        &'life0 self,
        request: ChatRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ChatResponse, ForgeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn chat_stream<'life0, 'async_trait>(
        &'life0 self,
        request: ChatRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StreamResult<StreamEvent>, ForgeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn info(&self) -> AdapterInfo

Source

fn chat<'life0, 'async_trait>( &'life0 self, request: ChatRequest, ) -> Pin<Box<dyn Future<Output = Result<ChatResponse, ForgeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn chat_stream<'life0, 'async_trait>( &'life0 self, request: ChatRequest, ) -> Pin<Box<dyn Future<Output = Result<StreamResult<StreamEvent>, ForgeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§