update id names

This commit is contained in:
ParthSareen 2025-10-24 14:16:17 -07:00
parent d98b996e9b
commit d46fbff387
2 changed files with 6 additions and 4 deletions

View File

@ -181,10 +181,11 @@ type Message struct {
Content string `json:"content"`
// Thinking contains the text that was inside thinking tags in the
// original model output when ChatRequest.Think is enabled.
Thinking string `json:"thinking,omitempty"`
Images []ImageData `json:"images,omitempty"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Thinking string `json:"thinking,omitempty"`
Images []ImageData `json:"images,omitempty"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
ToolName string `json:"tool_name,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
}
func (m *Message) UnmarshalJSON(b []byte) error {

View File

@ -2170,6 +2170,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
} else if len(toolCalls) > 0 {
for i := range toolCalls {
toolCalls[i].ID = toolCallId()
fmt.Println("toolCallID", toolCalls[i].ID)
}
res.Message.ToolCalls = toolCalls
res.Message.Content = ""