Tools cache and delegation improvements (#68)

* Fixing repeated tool usage treatment
* Improving agent delegation prompt
This commit is contained in:
João Moura
2024-01-06 11:46:34 -03:00
committed by GitHub
parent 7a22b03713
commit 234a2c72b0
4 changed files with 26 additions and 16 deletions

View File

@@ -66,7 +66,9 @@ class CrewAgentOutputParser(ReActSingleInputOutputParser):
"input": tool_input,
}
if usage == last_tool_usage:
raise TaskRepeatedUsageException(tool=action, tool_input=tool_input)
raise TaskRepeatedUsageException(
tool=action, tool_input=tool_input, text=text
)
result = self.cache.read(action, tool_input)
if result: