ref: add image url support to messages (#933)
Some checks failed
Integration tests / Run integration tests (push) Has been cancelled
Sanity check / Sanity check (push) Has been cancelled

* ref: add image url support to messages

* fix linter error

* fix linter error
This commit is contained in:
Mazyar Yousefiniyae shad
2025-02-09 22:06:44 +03:30
committed by GitHub
parent 2054db016c
commit a62919e8c6

View File

@@ -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"`