summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-02 11:39:55 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-02 11:39:55 +0300
commit3389b1d83bc9fcc605fdff813c826410d07cfe28 (patch)
treea9a3dc852f5fdc2f1b3050e8f70bfc687e6a781b /bot.go
parent4f6000a43ad2ee019a799c5b5154af9f853e2b83 (diff)
Fix: linter complaintsHEADmaster
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/bot.go b/bot.go
index 98dd27f..2c1689f 100644
--- a/bot.go
+++ b/bot.go
@@ -1213,19 +1213,19 @@ func findCall(msg, toolCall string) bool {
// Create RoleMsg with ContentParts
var contentParts []any
for _, part := range multimodalResp.Parts {
- partType, ok := part["type"]
- if !ok {
- continue
- }
- if partType == "text" {
+ partType := part["type"]
+ switch partType {
+ case "text":
contentParts = append(contentParts, models.TextContentPart{Type: "text", Text: part["text"]})
- } else if partType == "image_url" {
+ case "image_url":
contentParts = append(contentParts, models.ImageContentPart{
Type: "image_url",
ImageURL: struct {
URL string `json:"url"`
}{URL: part["url"]},
})
+ default:
+ continue
}
}
toolResponseMsg = models.RoleMsg{