X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/871743f6ab20d68dcede1673a9764730fda38308..277a37a79b51910074a29ca6d70fae75c73619b7:/compactor.go?ds=sidebyside diff --git a/compactor.go b/compactor.go index 0089002..8a16c6e 100644 --- a/compactor.go +++ b/compactor.go @@ -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, } }