BeforeModelCallback

Type Alias BeforeModelCallback 

Source
pub type BeforeModelCallback = Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>;
Expand description

Core traits and types.

Always available regardless of feature flags. Includes:

  • Agent - The fundamental trait for all agents
  • Tool / Toolset - For extending agents with capabilities
  • Session / State - For managing conversation context
  • Event - For streaming agent responses
  • AdkError / Result - Unified error handling

Aliased Typeยง

pub struct BeforeModelCallback(/* private fields */);