X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/e1e48ba388c28105fff3b70c8ca02304f5d57f53..38a9b0502a1ccefc6ccb3472c4a21805b222caa6:/prompt.go?ds=inline diff --git a/prompt.go b/prompt.go index ee86ebd..cd70250 100644 --- a/prompt.go +++ b/prompt.go @@ -185,8 +185,8 @@ func promptSubagent(name, instructions string) string { } // promptTools returns the function tools of every call of the agent: the tools -// of promptSubagentTools, then spawn and tell. A compaction sends them too and never -// calls them, because a change of the tools ends the shared prompt cache. +// of promptSubagentTools, then spawn, tell, and the WhatsApp tools. A compaction sends them too and +// never calls them, because a change of the tools ends the shared prompt cache. func promptTools() []ModelTool { return append(promptSubagentTools(), ModelTool{ Type: "function", @@ -214,6 +214,14 @@ func promptTools() []ModelTool { "message": promptStringSchema("The message."), }), Strict: true, + }, ModelTool{ + Type: "function", + Name: "whatsapp_find", + Description: "Find the WhatsApp contacts and groups of the user whose name contains the text, with no regard to case and accents. Gives up to 20 matches, each as ID | name | contact or group.", + Parameters: promptObjectSchema(map[string]any{ + "name": promptStringSchema("A part of the name of the contact or the group."), + }), + Strict: true, }) }