fix(orchestrator): better describing the note taking agent

This commit is contained in:
2025-04-12 07:53:43 +01:00
parent 36e776789e
commit 02490c6c84

View File

@ -26,16 +26,14 @@ eventLocationAgent
Use it when you think the image contains an event or a location of any sort. This can be an event page, a map, an address or a date.
noteAgent
Use it when there is text on the screen. Any text, always use this. Use me!
You should call this whenever an image has text.
CALL ME EVERY SINGLE TIME THERE IS TEXT
Use when there is ANY text on the image.
contactAgent
Use it when the image contains information relating a person.
defaultAgent
When none of the above apply.
noAction
When you think there is no more information to extract from the image.
Always call agents in parallel if you need to call more than 1.
@ -48,7 +46,7 @@ const MY_TOOLS = `
"type": "function",
"function": {
"name": "eventLocationAgent",
"description": "Uses the event location agent",
"description": "Use when you believe there is an event or location on the image",
"parameters": {
"type": "object",
"properties": {},
@ -60,7 +58,7 @@ const MY_TOOLS = `
"type": "function",
"function": {
"name": "noteAgent",
"description": "Uses the note agent",
"description": "Use when there is any text on the image, this can be code/text/formulas any writing",
"parameters": {
"type": "object",
"properties": {},
@ -72,7 +70,7 @@ const MY_TOOLS = `
"type": "function",
"function": {
"name": "contactAgent",
"description": "Uses the contact/people agent",
"description": "Use when then image contains some person or contact",
"parameters": {
"type": "object",
"properties": {},
@ -83,8 +81,8 @@ const MY_TOOLS = `
{
"type": "function",
"function": {
"name": "defaultAgent",
"description": "Used when you dont think its a good idea to call other agents",
"name": "noAction",
"description": "Use when you are sure nothing can be done about this image anymore",
"parameters": {
"type": "object",
"properties": {},
@ -117,14 +115,14 @@ func (agent OrchestratorAgent) Orchestrate(userId uuid.UUID, imageId uuid.UUID,
request := client.AgentRequestBody{
Model: "pixtral-12b-2409",
Temperature: 0.3,
Temperature: 0.4,
ResponseFormat: client.ResponseFormat{
Type: "text",
},
ToolChoice: &toolChoice,
Tools: &tools,
EndToolCall: "defaultAgent",
EndToolCall: "noAction",
Chat: &client.Chat{
Messages: make([]client.ChatMessage, 0),
@ -184,7 +182,7 @@ func NewOrchestratorAgent(eventLocationAgent EventLocationAgent, noteAgent NoteA
}, nil
})
agent.ToolHandler.AddTool("defaultAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) {
agent.ToolHandler.AddTool("noAction", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) {
// To nothing
return Status{