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
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:
committed by
GitHub
parent
2054db016c
commit
a62919e8c6
@@ -41,6 +41,7 @@ type MessageContent struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Text *MessageText `json:"text,omitempty"`
|
Text *MessageText `json:"text,omitempty"`
|
||||||
ImageFile *ImageFile `json:"image_file,omitempty"`
|
ImageFile *ImageFile `json:"image_file,omitempty"`
|
||||||
|
ImageURL *ImageURL `json:"image_url,omitempty"`
|
||||||
}
|
}
|
||||||
type MessageText struct {
|
type MessageText struct {
|
||||||
Value string `json:"value"`
|
Value string `json:"value"`
|
||||||
@@ -51,6 +52,11 @@ type ImageFile struct {
|
|||||||
FileID string `json:"file_id"`
|
FileID string `json:"file_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ImageURL struct {
|
||||||
|
URL string `json:"url"`
|
||||||
|
Detail string `json:"detail"`
|
||||||
|
}
|
||||||
|
|
||||||
type MessageRequest struct {
|
type MessageRequest struct {
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
|
|||||||
Reference in New Issue
Block a user