mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-28 01:28:14 +00:00
Fix failing tests
This commit is contained in:
@@ -305,9 +305,6 @@ class Agent(BaseAgent):
|
|||||||
self.response_template.split("{{ .Response }}")[1].strip()
|
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(
|
self.agent_executor = CrewAgentExecutor(
|
||||||
llm=self.llm,
|
llm=self.llm,
|
||||||
task=task,
|
task=task,
|
||||||
|
|||||||
@@ -194,10 +194,12 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
|||||||
self, formatted_answer: AgentAction, tool_result: ToolResult
|
self, formatted_answer: AgentAction, tool_result: ToolResult
|
||||||
) -> Union[AgentAction, AgentFinish]:
|
) -> Union[AgentAction, AgentFinish]:
|
||||||
"""Handle the AgentAction, execute tools, and process the results."""
|
"""Handle the AgentAction, execute tools, and process the results."""
|
||||||
# Directly append the result to the messages if the
|
add_image_tool = self._i18n.tools("add_image")
|
||||||
# tool is "Add image to content" in case of multimodal
|
if (
|
||||||
# agents
|
isinstance(add_image_tool, dict)
|
||||||
if formatted_answer.tool == self._i18n.tools("add_image")["name"]:
|
and formatted_answer.tool.casefold().strip()
|
||||||
|
== add_image_tool.get("name", "").casefold().strip()
|
||||||
|
):
|
||||||
self.messages.append(tool_result.result)
|
self.messages.append(tool_result.result)
|
||||||
return formatted_answer # Continue the loop
|
return formatted_answer # Continue the loop
|
||||||
|
|
||||||
@@ -233,7 +235,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
|||||||
formatted_answer = AgentAction(
|
formatted_answer = AgentAction(
|
||||||
text=e.error,
|
text=e.error,
|
||||||
tool="",
|
tool="",
|
||||||
tool_input={},
|
tool_input="",
|
||||||
thought="",
|
thought="",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user