From 85509392b33d6ee3aabf21541949e30b31b7ed67 Mon Sep 17 00:00:00 2001 From: Achim Rohn Date: Fri, 1 Aug 2025 13:09:36 +0200 Subject: [PATCH] Properly send the image data --- llm/mistral.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/llm/mistral.go b/llm/mistral.go index 24dcde1..77c91a6 100644 --- a/llm/mistral.go +++ b/llm/mistral.go @@ -39,10 +39,17 @@ type ChatCompletionRequest struct { ResponseFormat ChatCompletionRequestResponseFormat `json:"response_format,omitempty"` } +// ContentItem represents a single content item (text or image) +type ContentItem struct { + Type string `json:"type"` + Text string `json:"text,omitempty"` + ImageURL string `json:"image_url,omitempty"` +} + // Message represents a chat message type Message struct { - Role string `json:"role"` - Content string `json:"content"` + Role string `json:"role"` + Content interface{} `json:"content"` } // Tool represents a function tool