diff options
author | Grail Finder <wohilas@gmail.com> | 2025-08-08 13:03:37 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-08-08 13:03:37 +0300 |
commit | d7d432b8a1dbea9e18f78d835112fa074051f587 (patch) | |
tree | 517a6e057aaf3fb5fd418690bfff1941d55c45bb /models | |
parent | 589dfdda3fa89ecc984530ce3bfcc58ee2fd851d (diff) |
Enha: /chat /completions tool calls to live in peace
Diffstat (limited to 'models')
-rw-r--r-- | models/models.go | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/models/models.go b/models/models.go index 9ca12d9..69d812b 100644 --- a/models/models.go +++ b/models/models.go @@ -5,9 +5,14 @@ import ( "strings" ) +// type FuncCall struct { +// Name string `json:"name"` +// Args []string `json:"args"` +// } + type FuncCall struct { - Name string `json:"name"` - Args []string `json:"args"` + Name string `json:"name"` + Args map[string]string `json:"args"` } type LLMResp struct { @@ -30,11 +35,14 @@ type LLMResp struct { ID string `json:"id"` } +type ToolDeltaFunc struct { + Name string `json:"name"` + Arguments string `json:"arguments"` +} + type ToolDeltaResp struct { - Index int `json:"index"` - Function struct { - Arguments string `json:"arguments"` - } `json:"function"` + Index int `json:"index"` + Function ToolDeltaFunc `json:"function"` } // for streaming @@ -63,6 +71,7 @@ type TextChunk struct { ToolChunk string Finished bool ToolResp bool + FuncName string } type RoleMsg struct { |