mirror of
https://github.com/hanzo-go/openai.git
synced 2026-09-24 00:31:39 +00:00
ref: add image url support to messages (#933)
* ref: add image url support to messages * fix linter error * fix linter error
This commit is contained in:
committed by
GitHub
parent
419a197b1f
commit
8c6a2f1dfd
@@ -41,6 +41,7 @@ type MessageContent struct {
|
||||
Type string `json:"type"`
|
||||
Text *MessageText `json:"text,omitempty"`
|
||||
ImageFile *ImageFile `json:"image_file,omitempty"`
|
||||
ImageURL *ImageURL `json:"image_url,omitempty"`
|
||||
}
|
||||
type MessageText struct {
|
||||
Value string `json:"value"`
|
||||
@@ -51,6 +52,11 @@ type ImageFile struct {
|
||||
FileID string `json:"file_id"`
|
||||
}
|
||||
|
||||
type ImageURL struct {
|
||||
URL string `json:"url"`
|
||||
Detail string `json:"detail"`
|
||||
}
|
||||
|
||||
type MessageRequest struct {
|
||||
Role string `json:"role"`
|
||||
Content string `json:"content"`
|
||||
|
||||
Reference in New Issue
Block a user