Skip to main content

EvalAgent

Trait EvalAgent 

Source
pub trait EvalAgent: Send + Sync {
    // Required method
    fn respond<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A callable async agent for use with EvalRunner.

Returns the agent’s response for a given input string.

Required Methods§

Source

fn respond<'life0, 'life1, 'async_trait>( &'life0 self, input: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run the agent on the given input and return a response.

Implementors§