Expand description
Buffered OpenAI Chat Completions ↔ Responses conversion.
The pair is intentionally direct and field based. Message history is
reconstructed into the target protocol’s declared input/output items; no
common content representation or source rest map is used.
Modules§
- stream
- Direct, typed incremental OpenAI Chat ↔ Responses conversion.
Structs§
- Chat
Usage Supplement - Actual usage facts absent from an older Chat response. None never means zero.
- Responses
Response Context - The original Responses request and effective settings retained during request preparation. Required settings must come from that invocation, not guesses made after receiving a Chat completion. A response conversion consumes this value and recursively removes extensions before reusing same-dialect fields.
Enums§
- Tool
Call Kind - Exact declared call kind recovered from a previous response, never inferred from an ID prefix.
Functions§
- chat_
to_ responses_ request - chat_
to_ responses_ request_ with_ calls - chat_
to_ responses_ response - Convert one completed Chat choice using facts retained from its original Responses request. The dedicated response identity flow is reused on retries and by streaming adapters; it is committed only after successful conversion.
- responses_
to_ chat_ request - responses_
to_ chat_ response - Converts a terminal Responses object. Failed, pending, and cancelled responses are never reported as successful Chat completions.