Skip to content
1 min read · 179 words

Interface: OllamaMessage ​

Defined in: src/batteries/llm/ollama/types.ts:158

A native Ollama chat message. Flat shape: content is always a string; image attachments ride in a separate base64 images[] array (no content blocks); thinking carries reasoning; a tool-role result message labels its origin with tool_name (NOT a tool_call_id).

Properties ​

PropertyTypeDescriptionDefined in
contentstringFlat text body of the message (never a content-block array).src/batteries/llm/ollama/types.ts:162
images?string[]Base64-encoded image attachments, sent out-of-band from content.src/batteries/llm/ollama/types.ts:166
role"user" | "assistant" | "tool" | "system"Author role of the message.src/batteries/llm/ollama/types.ts:160
thinking?stringReasoning/thinking text emitted by thinking-capable models.src/batteries/llm/ollama/types.ts:164
tool_calls?OllamaToolCall[]Tool calls the model emitted on this (assistant) message.src/batteries/llm/ollama/types.ts:168
tool_name?stringName of the tool a tool-role result message corresponds to.src/batteries/llm/ollama/types.ts:170