summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-02 07:12:28 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-02 07:12:28 +0300
commitcaac1d397ad8e21c22219708c070e5e6608b7859 (patch)
tree503e677925292e8d4b763de8a14c5c6b90db3bdf /models
parent742f1ca838f97cf7deaae624d93f307632863460 (diff)
Feat: read img tool for chat endpoint
Diffstat (limited to 'models')
-rw-r--r--models/consts.go3
-rw-r--r--models/models.go8
2 files changed, 7 insertions, 4 deletions
diff --git a/models/consts.go b/models/consts.go
index 4f61435..8b4002b 100644
--- a/models/consts.go
+++ b/models/consts.go
@@ -1,7 +1,8 @@
package models
const (
- LoadedMark = "(loaded) "
+ LoadedMark = "(loaded) "
+ ToolRespMultyType = "multimodel_content"
)
type APIType int
diff --git a/models/models.go b/models/models.go
index a35f16c..973eb3d 100644
--- a/models/models.go
+++ b/models/models.go
@@ -391,7 +391,6 @@ func CreateImageURLFromPath(imagePath string) (string, error) {
if err != nil {
return "", err
}
-
// Determine the image format based on file extension
var mimeType string
switch {
@@ -408,10 +407,8 @@ func CreateImageURLFromPath(imagePath string) (string, error) {
default:
mimeType = "image/jpeg" // default
}
-
// Encode to base64
encoded := base64.StdEncoding.EncodeToString(data)
-
// Create data URL
return fmt.Sprintf("data:%s;base64,%s", mimeType, encoded), nil
}
@@ -623,3 +620,8 @@ type ChatRoundReq struct {
Regen bool
Resume bool
}
+
+type MultimodalToolResp struct {
+ Type string `json:"type"`
+ Parts []map[string]string `json:"parts"`
+}