Type Alias LlmSanitize Response Fn
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 LlmSanitizeResponseFn = Arc<dyn Fn(Json, LlmSanitizeResponseContext) -> Pin<Box<dyn Future<Output = Result<Option<Json>>> + Send>> + Send + Sync>;
Sanitize an LLM response before the runtime records it.
These callbacks rewrite the JSON response payload captured on LLM-end events, which is useful for redaction or payload normalization.
Parameters
- First argument: JSON response payload to sanitize for observability.
- Second argument: Per-call response codec identity and capability.
Returns
Some contains the sanitized response for the emitted event. None omits both the raw response 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.