Struct LlmSanitize Response Context
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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.
Per-call codec identity and capability for an LLM response.
The context distinguishes no codec, Relay built-ins, runtime-registered codecs, and active codecs with no stable identity.
Implementations
impl LlmSanitizeResponseContext
impl LlmSanitizeResponseContext
with_identity
pub fn with_identity(codec: LlmCodecIdentity) -> LlmSanitizeResponseContext
Construct a context that carries only a codec identity.
Identity-only contexts do not carry a codec handle, so Self::resolve_codec returns None even when the identity describes an active codec.
for_response_codec
pub fn for_response_codec(
codec: Option<Arc<dyn LlmResponseCodec>>,
) -> LlmSanitizeResponseContext
Construct response codec context from the active response codec.
codec
pub fn codec(&self) -> &LlmCodecIdentity
Return the identity of the codec active for this payload direction.
resolve_codec
pub fn resolve_codec(&self) -> Option<Arc<dyn LlmResponseCodec>>
Resolve the active response codec.
Returns None for contexts constructed with Self::with_identity.
Trait Implementations
impl Clone for LlmSanitizeResponseContext
impl Clone for LlmSanitizeResponseContext
clone
fn clone(&self) -> LlmSanitizeResponseContext
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for LlmSanitizeResponseContext
impl Debug for LlmSanitizeResponseContext
fmt
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>
impl Default for LlmSanitizeResponseContext
impl Default for LlmSanitizeResponseContext
default
fn default() -> LlmSanitizeResponseContext