diff options
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 17 |
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"` |