mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-11 16:43:41 +08:00
feat: support gemini tool calling (close #368)
This commit is contained in:
@@ -148,7 +148,7 @@ func (m Message) ParseContent() []MediaMessage {
|
||||
if ok {
|
||||
subObj["detail"] = detail.(string)
|
||||
} else {
|
||||
subObj["detail"] = "auto"
|
||||
subObj["detail"] = "high"
|
||||
}
|
||||
contentList = append(contentList, MediaMessage{
|
||||
Type: ContentTypeImageURL,
|
||||
@@ -157,7 +157,16 @@ func (m Message) ParseContent() []MediaMessage {
|
||||
Detail: subObj["detail"].(string),
|
||||
},
|
||||
})
|
||||
} else if url, ok := contentMap["image_url"].(string); ok {
|
||||
contentList = append(contentList, MediaMessage{
|
||||
Type: ContentTypeImageURL,
|
||||
ImageUrl: MessageImageUrl{
|
||||
Url: url,
|
||||
Detail: "high",
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return contentList
|
||||
|
||||
Reference in New Issue
Block a user