Skip to content

Commit a62919e

Browse files
ref: add image url support to messages (#933)
* ref: add image url support to messages * fix linter error * fix linter error
1 parent 2054db0 commit a62919e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

messages.go

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type MessageContent struct {
4141
Type string `json:"type"`
4242
Text *MessageText `json:"text,omitempty"`
4343
ImageFile *ImageFile `json:"image_file,omitempty"`
44+
ImageURL *ImageURL `json:"image_url,omitempty"`
4445
}
4546
type MessageText struct {
4647
Value string `json:"value"`
@@ -51,6 +52,11 @@ type ImageFile struct {
5152
FileID string `json:"file_id"`
5253
}
5354

55+
type ImageURL struct {
56+
URL string `json:"url"`
57+
Detail string `json:"detail"`
58+
}
59+
5460
type MessageRequest struct {
5561
Role string `json:"role"`
5662
Content string `json:"content"`

0 commit comments

Comments
 (0)