File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,10 +221,10 @@ func (b *BaseAgent) handleToolCalls(toolCalls []ToolCall) error {
221221 }
222222 b .mutex .Lock ()
223223 b .memory .Add (Message {
224- Role : RoleTool ,
225- Content : r .Content ,
226- Name : r .Name ,
227- ToolID : r .CallID ,
224+ Role : RoleTool ,
225+ Content : r .Content ,
226+ Name : r .Name ,
227+ ToolCallID : r .CallID ,
228228 })
229229 b .mutex .Unlock ()
230230 }
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ type ChatCompletionRequest struct {
3737
3838// Message represents a chat message with standardized fields.
3939type Message struct {
40- Role string `json:"role"`
41- Content string `json:"content"`
42- Name string `json:"name,omitempty"`
43- ToolCalls []ToolCall `json:"tool_calls,omitempty"`
44- ToolID string `json:"tool_id ,omitempty"`
40+ Role string `json:"role"`
41+ Content string `json:"content"`
42+ Name string `json:"name,omitempty"`
43+ ToolCalls []ToolCall `json:"tool_calls,omitempty"`
44+ ToolCallID string `json:"tool_call_id ,omitempty"`
4545}
4646
4747// ToolCall represents a tool invocation request.
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func mapToOpenAIMessages(messages []Message) []openai.ChatCompletionMessage {
5959 Role : m .Role ,
6060 Name : m .Name ,
6161 Content : m .Content ,
62- ToolCallID : m .ToolID ,
62+ ToolCallID : m .ToolCallID ,
6363 })
6464 } else {
6565 msg := openai.ChatCompletionMessage {
You can’t perform that action at this time.
0 commit comments