Skip to main content

Module convert

Module convert 

Source
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.
to_openai_messages
Render user/assistant history as OpenAI messages, returning (messages, system_prompt).
to_openai_tools