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