Skip to main content

BeforeModelCallback

Type Alias BeforeModelCallback 

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

Callback invoked before a model call. Can modify the request or skip the call entirely.

Aliased Typeยง

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