fix(logger): nil pointer error + log debug level clean

This commit is contained in:
2025-04-17 11:07:37 +01:00
parent 6d2f0c6108
commit 3716d22eca
4 changed files with 7 additions and 5 deletions

View File

@@ -160,8 +160,6 @@ func (client AgentClient) Request(req *AgentRequestBody) (AgentResponse, error)
return AgentResponse{}, errors.New("Unsupported. We currently only accept 1 choice from AI.")
}
client.Log.SetLevel(log.DebugLevel)
msg := agentResponse.Choices[0].Message
if len(msg.Content) > 0 {
@@ -229,7 +227,6 @@ func (client *AgentClient) Process(info ToolHandlerInfo, req *AgentRequestBody)
client.Reply = toolCall.Function.Arguments
}
client.Log.SetLevel(log.DebugLevel)
client.Log.Debugf("Response: %s", toolResponse.Content)
req.Chat.AddToolResponse(toolResponse)