Type Alias LlmSanitize Request Fn

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub type LlmSanitizeRequestFn = Arc<dyn Fn(LlmRequest, LlmSanitizeRequestContext) -> Pin<Box<dyn Future<Output = Result<Option<LlmRequest>>> + Send>> + Send + Sync>;

Sanitize an LLM request before the runtime records it.

LLM request sanitizers affect the serialized request payload emitted on start events. They do not mutate the caller-owned LlmRequest unless a separate request intercept does so.

Parameters

  • First argument: LLM request payload to sanitize for observability.
  • Second argument: Per-call request codec identity and capability.

Returns

Some contains the sanitized request for the emitted event. None omits both the raw request payload and its annotation from that event.

The context is always supplied and distinguishes no codec, built-in codecs, runtime-registered codecs, and opaque active codecs.

Aliased Type

1pub struct LlmSanitizeRequestFn { /* private fields */ }