Trait ReActExecutor

Source
pub trait ReActExecutor:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn process_tool_calls<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tools: &'life1 [Box<dyn ToolT>],
        tool_calls: Vec<ToolCall>,
        tx_event: Sender<Event>,
        _memory: Option<Arc<RwLock<Box<dyn MemoryProvider>>>>,
    ) -> Pin<Box<dyn Future<Output = Vec<ToolCallResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn process_turn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        llm: Arc<dyn LLMProvider>,
        messages: &'life1 [ChatMessage],
        memory: Option<Arc<RwLock<Box<dyn MemoryProvider>>>>,
        tools: &'life2 [Box<dyn ToolT>],
        agent_config: &'life3 AgentConfig,
        state: Arc<RwLock<AgentState>>,
        tx_event: Sender<Event>,
    ) -> Pin<Box<dyn Future<Output = Result<TurnResult<ReActAgentOutput>, ReActExecutorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
}

Provided Methods§

Source

fn process_tool_calls<'life0, 'life1, 'async_trait>( &'life0 self, tools: &'life1 [Box<dyn ToolT>], tool_calls: Vec<ToolCall>, tx_event: Sender<Event>, _memory: Option<Arc<RwLock<Box<dyn MemoryProvider>>>>, ) -> Pin<Box<dyn Future<Output = Vec<ToolCallResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn process_turn<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, llm: Arc<dyn LLMProvider>, messages: &'life1 [ChatMessage], memory: Option<Arc<RwLock<Box<dyn MemoryProvider>>>>, tools: &'life2 [Box<dyn ToolT>], agent_config: &'life3 AgentConfig, state: Arc<RwLock<AgentState>>, tx_event: Sender<Event>, ) -> Pin<Box<dyn Future<Output = Result<TurnResult<ReActAgentOutput>, ReActExecutorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§