Fix failing tests

This commit is contained in:
Brandon Hancock
2025-01-08 11:22:09 -05:00
parent 0718120634
commit 2651646640
3 changed files with 861 additions and 31616 deletions

View File

@@ -305,9 +305,6 @@ class Agent(BaseAgent):
self.response_template.split("{{ .Response }}")[1].strip()
)
print("self.max_rpm:", self.max_rpm)
print("self._rpm_controller:", self._rpm_controller)
self.agent_executor = CrewAgentExecutor(
llm=self.llm,
task=task,

View File

@@ -194,10 +194,12 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
self, formatted_answer: AgentAction, tool_result: ToolResult
) -> Union[AgentAction, AgentFinish]:
"""Handle the AgentAction, execute tools, and process the results."""
# Directly append the result to the messages if the
# tool is "Add image to content" in case of multimodal
# agents
if formatted_answer.tool == self._i18n.tools("add_image")["name"]:
add_image_tool = self._i18n.tools("add_image")
if (
isinstance(add_image_tool, dict)
and formatted_answer.tool.casefold().strip()
== add_image_tool.get("name", "").casefold().strip()
):
self.messages.append(tool_result.result)
return formatted_answer # Continue the loop
@@ -233,7 +235,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
formatted_answer = AgentAction(
text=e.error,
tool="",
tool_input={},
tool_input="",
thought="",
)

File diff suppressed because it is too large Load Diff