pub type BeforeGenerationNotice = Box<dyn Fn(&TraceContext, &[Message]) -> Async<Option<String>> + Send + Sync>;Expand description
Supply a pending runtime notice before a generation step. The returned text is appended as internal system content to the latest user input or tool result and checkpointed before generation; this callback does not reload the system prompt. Retries reuse the same input. Consume the notice only when the future completes, since cancellation can drop the future.
Aliased Typeยง
pub struct BeforeGenerationNotice(/* private fields */);