]> git.giacomolli.uk - onechat/blobdiff - compactor.go
Deliver routed WhatsApp batches to children
[onechat] / compactor.go
index 0089002a4838b057303e210c62a34b434b486ae0..8a16c6e8da18d3ff39ea07eed762e7bc57ee7f4d 100644 (file)
@@ -18,13 +18,14 @@ var compactorRuler = strings.Repeat("-", nodeBytes)
 
 // newCompactor returns the compactor of an agent, which sends its calls through
 // client with model. instructions gives the system prompt of the agent at each
-// build, so a build sends the same prompt as the turns of that time.
-func newCompactor(client *ModelClient, instructions func() (string, error), model ModelConfig) *Compactor {
+// build. tools are the tools of that agent, so a build sends the same prompt
+// and tools as its turns.
+func newCompactor(client *ModelClient, instructions func() (string, error), model ModelConfig, tools []ModelTool) *Compactor {
        return &Compactor{
                client:       client,
                model:        model,
                instructions: instructions,
-               tools:        promptTools(),
+               tools:        tools,
        }
 }