summaryrefslogtreecommitdiff
path: root/models/models.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-08-08 10:22:22 +0300
committerGrail Finder <wohilas@gmail.com>2025-08-08 10:22:22 +0300
commit14558f98cd5621e9c5019ba1ba957f06e86d2cc6 (patch)
tree1bd1eeba2d62d4d7167650e59554101e1e137554 /models/models.go
parent3c23ff2403124753314cc960635930d9b1134760 (diff)
WIP: adding tool fields into stream resp struct
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index c88417f..9ca12d9 100644
--- a/models/models.go
+++ b/models/models.go
@@ -30,13 +30,21 @@ type LLMResp struct {
ID string `json:"id"`
}
+type ToolDeltaResp struct {
+ Index int `json:"index"`
+ Function struct {
+ Arguments string `json:"arguments"`
+ } `json:"function"`
+}
+
// for streaming
type LLMRespChunk struct {
Choices []struct {
FinishReason string `json:"finish_reason"`
Index int `json:"index"`
Delta struct {
- Content string `json:"content"`
+ Content string `json:"content"`
+ ToolCalls []ToolDeltaResp `json:"tool_calls"`
} `json:"delta"`
} `json:"choices"`
Created int `json:"created"`
@@ -50,6 +58,13 @@ type LLMRespChunk struct {
} `json:"usage"`
}
+type TextChunk struct {
+ Chunk string
+ ToolChunk string
+ Finished bool
+ ToolResp bool
+}
+
type RoleMsg struct {
Role string `json:"role"`
Content string `json:"content"`