Adapter

Trait Adapter 

Source
pub trait Adapter:
    Send
    + Sync
    + 'static {
    // Required methods
    fn format(&self, signature: &dyn MetaSignature, inputs: Example) -> Chat;
    fn parse_response(
        &self,
        signature: &dyn MetaSignature,
        response: Message,
    ) -> HashMap<String, Value>;
    fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        lm: Arc<LM>,
        signature: &'life1 dyn MetaSignature,
        inputs: Example,
    ) -> Pin<Box<dyn Future<Output = Result<Prediction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn format(&self, signature: &dyn MetaSignature, inputs: Example) -> Chat

Source

fn parse_response( &self, signature: &dyn MetaSignature, response: Message, ) -> HashMap<String, Value>

Source

fn call<'life0, 'life1, 'async_trait>( &'life0 self, lm: Arc<LM>, signature: &'life1 dyn MetaSignature, inputs: Example, ) -> Pin<Box<dyn Future<Output = Result<Prediction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§