]> git.giacomolli.uk - onechat/blobdiff - prompt.go
Link WhatsApp with a pairing code
[onechat] / prompt.go
index 8bd96911aef70364b58dfbef8c97d92b9d6fe5b3..b9d928467c2d0ebb78f9a56ab17aa96f262c776a 100644 (file)
--- 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. A compaction sends them too and never
-// calls them, because a change of the tools ends the shared prompt cache.
+// 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.
 func promptTools() []ModelTool {
        return append(promptSubagentTools(), ModelTool{
                Type:        "function",
@@ -205,6 +205,15 @@ func promptTools() []ModelTool {
                        },
                }),
                Strict: true,
+       }, ModelTool{
+               Type:        "function",
+               Name:        "tell",
+               Description: `Send a message to a subagent, by name. One at work reads it between its tool calls, and its report answers it; a finished one goes on from its chat, and its reply reaches you as a message "[Name] reply".`,
+               Parameters: promptObjectSchema(map[string]any{
+                       "name":    promptStringSchema("The name of the subagent."),
+                       "message": promptStringSchema("The message."),
+               }),
+               Strict: true,
        })
 }