mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 04:17:34 +01:00
Add Tool Call ID (#12956)
* routes/types: add tool call id --------- Co-authored-by: ParthSareen <parth.sareen@ollama.com>
This commit is contained in:
10
api/types.go
10
api/types.go
@@ -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 {
|
||||
@@ -200,6 +201,7 @@ func (m *Message) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
type ToolCall struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Function ToolCallFunction `json:"function"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user