Skip to main content

AgentEngine

Trait AgentEngine 

Source
pub trait AgentEngine: Send + Sync {
    // Required methods
    fn process<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        state: &'life1 AppState,
        context: AgentRequestContext<'life2>,
        override_prompt: Option<&'life3 str>,
        image_data: Option<(String, String)>,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn process_with_events<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        state: &'life1 AppState,
        context: AgentRequestContext<'life2>,
        override_prompt: Option<&'life3 str>,
        image_data: Option<(String, String)>,
        event_tx: Option<&'life4 UnboundedSender<AgentEvent>>,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
}

Required Methods§

Source

fn process<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, state: &'life1 AppState, context: AgentRequestContext<'life2>, override_prompt: Option<&'life3 str>, image_data: Option<(String, String)>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn process_with_events<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, state: &'life1 AppState, context: AgentRequestContext<'life2>, override_prompt: Option<&'life3 str>, image_data: Option<(String, String)>, event_tx: Option<&'life4 UnboundedSender<AgentEvent>>, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§