Skip to main content

LlmRequestInterceptFn

Type Alias LlmRequestInterceptFn 

Source
pub type LlmRequestInterceptFn = Box<dyn Fn(&str, LlmRequest, Option<AnnotatedLlmRequest>) -> Result<(LlmRequest, Option<AnnotatedLlmRequest>)> + Send + Sync>;
Expand description

Rewrite or annotate an LLM request before execution.

Request intercepts can transform the wire request, attach or replace a normalized AnnotatedLlmRequest, or both.

Aliased Typeยง

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