Expand description
Shared conversion helpers between the infinity protocol Message types and
the OpenAI / Anthropic wire formats.
Functions§
- arguments_
to_ string - classify_
http_ status - Classify an HTTP failure into the protocol’s retry classes.
- error_
message_ from_ body - Extract a human-readable message from a JSON error body.
- push_
bytes - Buffer raw response bytes into
out, holding back split UTF-8. - take_
frames - Split complete SSE frames off the front of
buf, leaving any partial tail in place for the next read. - to_
openai_ messages - Render user/assistant history as
OpenAImessages, returning(messages, system_prompt). - to_
openai_ tools