fix: using correct eventAgent instead of orchestrator bug + better logging

This commit is contained in:
2025-04-17 10:48:30 +01:00
parent e42aa75639
commit 82331c0833
3 changed files with 7 additions and 9 deletions

View File

@@ -178,6 +178,7 @@ func NewEventAgent(log *log.Logger, eventsModel models.EventModel, locationAgent
agentClient.ToolHandler.AddTool("getEventLocationId", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) {
query := "Can you get me the ID of the location present in this image?"
locationAgent.Log = log.With("Locations 📍", true)
locationAgent.RunAgent(locationPrompt, locationTools, "finish", &query, info.UserId, info.ImageId, info.ImageName, *info.Image)
return locationAgent.Reply, nil

View File

@@ -144,7 +144,7 @@ func NewOrchestratorAgent(log *log.Logger, noteAgent NoteAgent, contactAgent cli
})
agent.ToolHandler.AddTool("eventAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) {
go agent.RunAgent(eventPrompt, eventTools, "finish", nil, info.UserId, info.ImageId, imageName, imageData)
go eventAgent.RunAgent(eventPrompt, eventTools, "finish", nil, info.UserId, info.ImageId, imageName, imageData)
return Status{
Ok: true,