Skip to main content

ContextPolicy

Trait ContextPolicy 

Source
pub trait ContextPolicy: Send + Sync {
    // Required method
    fn select(
        &self,
        history: &[Message],
        system_prompt: &str,
        tools: &[ToolSpec],
    ) -> Result<ContextSelection, ContextError>;
}

Required Methods§

Source

fn select( &self, history: &[Message], system_prompt: &str, tools: &[ToolSpec], ) -> Result<ContextSelection, ContextError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§