Properly send the image data
This commit is contained in:
+8
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user