Expand description
The chat-wire layer: the ChatMessage/ChatAttachment request model, the
lenient and strict parsers that turn an incoming OpenAI/Ollama payload into
messages, the outbound payload_value rendering, tool-spec decoding, and the
generic ChatML prompt fallback. This is what a gateway uses to bridge a wire
request to the kernel’s dispatch surface and back.
Structs§
- Chat
Attachment - A file attached to a chat message: an image forwarded to a vision model, or a document inlined into the prompt text.
- Chat
Message - A chat turn: role and content plus optional tool calls, tool-result routing, and attachments.
- Chat
MlPrompt - The generic ChatML fallback prompt for a model with no chat template.
Enums§
- Attachment
Kind - What kind of thing a
ChatAttachmentcarries. - Chat
Role - A chat message’s author.
- Chat
Wire Error - Why a chat-wire payload could not be parsed.
Functions§
- decode_
tool_ specs - Decode OpenAI-style function tools from a request’s
toolsvalue: an array of{type: "function", function: {name, description?, parameters?}}. Absent → empty; malformed →ChatWireError.