mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-04 12:41:50 +08:00
Merge pull request #203 from RuoJi6/RuoJi6/feat/issue-194-memory-limit
fix: limit ARTEX container and tool memory use # Conflicts: # agent/chat.go # agent/mainagent.go # agent/planner.go
This commit is contained in:
commit
9ce996ef46
36 files changed
+1869
-64
No files matched your search
+2
-2
@@ -148,14 +148,14 @@ func NewWorker(prov llm.Provider, model, workDir string, tx *transcript.Store, w
|
||||
return &Worker{prov: prov, model: model, workDir: workDir, tx: tx, window: window, maxTurns: maxTurns, extraTools: extra}
|
||||
}
|
||||
|
||||
// defaultToolsExcept returns actool.DefaultTools() minus the named tools (by
|
||||
// defaultToolsExcept returns guardedDefaultTools() minus the named tools (by
|
||||
// CoreTool.Name()). Used to trim SDK default tools an agent shouldn't have.
|
||||
func defaultToolsExcept(exclude ...string) []actool.CoreTool {
|
||||
drop := make(map[string]bool, len(exclude))
|
||||
for _, n := range exclude {
|
||||
drop[n] = true
|
||||
}
|
||||
all := actool.DefaultTools()
|
||||
all := guardedDefaultTools()
|
||||
out := make([]actool.CoreTool, 0, len(all))
|
||||
for _, t := range all {
|
||||
if !drop[t.Name()] {
|
||||
|
||||
Reference in new issue
Block a user