Skip to navigation

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.

Provider streaming codec contracts and normalized stream events. Streaming response codecs for the managed LLM execution pipeline.

crate::codec::traits::LlmResponseCodec decodes a complete provider response into a normalized AnnotatedLlmResponse. For streaming providers, the analogous job is to:

  1. consume per-chunk events as they arrive on a streaming HTTP response, and
  2. assemble a single non-streaming-shape JSON payload at end of stream.

Once assembled, the payload can be fed back through the matching crate::codec::traits::LlmResponseCodec to produce an AnnotatedLlmResponse - meaning streaming and non-streaming requests converge on the same observability output without per-route shape duplication.

StreamingCodec is the trait that bundles the two functions (LlmCollectorFn, LlmFinalizerFn) used by the runtime streaming execution API. Each provider supplies one impl whose internal state holds whatever incremental information is needed to materialize the final payload.

Enums

Traits

  • StreamingCodec: Per-provider streaming codec used with the runtime streaming execution API.