fix: add index in the tool calls when chat by stream (gemini)

This commit is contained in:
Yan committed 2024-12-28 17:56:31 +08:00
1 parent 46fcb691d5
commit 49a0db1da8
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -86,6 +86,10 @@ type ToolCall struct {
Function FunctionCall `json:"function"`
}
func (c *ToolCall) SetIndex(i int) {
c.Index = &i
}
type FunctionCall struct {
Description string `json:"description,omitempty"`
Name string `json:"name,omitempty"`