Skip to main content

DynamicInstruction

Trait DynamicInstruction 

Source
pub trait DynamicInstruction: Send + Sync {
    // Required method
    fn instruction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 AgentRunState,
    ) -> Pin<Box<dyn Future<Output = DynamicInstructionResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Instruction generator called per agent run.

Required Methods§

Source

fn instruction<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 AgentRunState, ) -> Pin<Box<dyn Future<Output = DynamicInstructionResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate instruction text for the current run state.

§Errors

Returns an error when instruction generation fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§