X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/eeb821ff17ad79c87ca9b64cd9be26f8612f4a03..38a9b0502a1ccefc6ccb3472c4a21805b222caa6:/prompt.go?ds=inline diff --git a/prompt.go b/prompt.go index b9d9284..cd70250 100644 --- a/prompt.go +++ b/prompt.go @@ -185,7 +185,7 @@ 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 +// 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{ @@ -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, }) }