Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Bytes-level dispatch from a resolved TransformPair to its typed pair functions. The private content module holds content-generation pairs; other holds count_tokens/models/embeddings/images/compact. Streaming is wired for content pairs only.

Structs§

StreamConverter
Stateful 0..N stream-event converter for one resolved pair.

Enums§

StreamEventOut
One converted stream event: pre-encoded inbound frame payload, or the typed Responses event when the inbound side runs the aggregation state machine.

Functions§

is_wired
Whether the bytes dispatch has arms for this pair.
request_bytes
Convert a request body (inbound wire JSON → upstream wire JSON).
request_bytes_detailed
Convert a request and return non-fatal semantic-loss diagnostics.
response_bytes
Convert a response body (upstream wire JSON → inbound wire JSON). The pair here is the REVERSE pair (resolve(upstream_key, inbound_key)).
response_bytes_detailed
Convert a response and return non-fatal semantic-loss diagnostics.
stream_event
Convert one decoded stream event (upstream wire JSON text → inbound event). Same reverse-pair convention as response_bytes. Only content-generation pairs stream; the other groups are buffered. This convenience call retains no cross-frame state; use StreamConverter for an actual response stream.