Properly send the image data

This commit is contained in:
Achim Rohn
2025-08-01 13:09:36 +02:00
parent 9d82696971
commit 85509392b3
+9 -2
View File
@@ -39,10 +39,17 @@ type ChatCompletionRequest struct {
ResponseFormat ChatCompletionRequestResponseFormat `json:"response_format,omitempty"` 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 // Message represents a chat message
type Message struct { type Message struct {
Role string `json:"role"` Role string `json:"role"`
Content string `json:"content"` Content interface{} `json:"content"`
} }
// Tool represents a function tool // Tool represents a function tool