From a62919e8c66e35db125c129e8a9d2566a73e1e1f Mon Sep 17 00:00:00 2001 From: Mazyar Yousefiniyae shad Date: Sun, 9 Feb 2025 22:06:44 +0330 Subject: [PATCH] ref: add image url support to messages (#933) * ref: add image url support to messages * fix linter error * fix linter error --- messages.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/messages.go b/messages.go index 9023639..3852d2e 100644 --- a/messages.go +++ b/messages.go @@ -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"`