Skip to main content

AgentExecutor

Trait AgentExecutor 

Source
pub trait AgentExecutor:
    Send
    + Sync
    + 'static {
    // Required method
    fn execute_query<'life0, 'async_trait>(
        &'life0 self,
        message: String,
        session_id: String,
        state: AppState,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for agent execution – injected into AppState for testability.

Required Methods§

Source

fn execute_query<'life0, 'async_trait>( &'life0 self, message: String, session_id: String, state: AppState, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a query for a given session. Called as a background task.

Implementors§