From 6b566bab04179e75e0d2ef721a579e72f074174b Mon Sep 17 00:00:00 2001 From: shankinson Date: Mon, 14 Oct 2024 15:42:52 -0300 Subject: [PATCH] Use a slice for the manager request. Make the task use the agent i18n settings --- src/crewai/agents/agent_builder/utilities/base_agent_tool.py | 3 ++- src/crewai/translations/en.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/crewai/agents/agent_builder/utilities/base_agent_tool.py b/src/crewai/agents/agent_builder/utilities/base_agent_tool.py index 556873f390..fef4ee9ef8 100644 --- a/src/crewai/agents/agent_builder/utilities/base_agent_tool.py +++ b/src/crewai/agents/agent_builder/utilities/base_agent_tool.py @@ -81,6 +81,7 @@ def _execute( task_with_assigned_agent = Task( # type: ignore # Incompatible types in assignment (expression has type "Task", variable has type "str") description=task, agent=agent, - expected_output="Your best answer to your coworker asking you this, accounting for the context shared.", + expected_output=agent.i18n.slice("manager_request"), + i18n=agent.i18n, ) return agent.execute_task(task_with_assigned_agent, context) diff --git a/src/crewai/translations/en.json b/src/crewai/translations/en.json index e3b858ca53..aad49ff5f6 100644 --- a/src/crewai/translations/en.json +++ b/src/crewai/translations/en.json @@ -20,7 +20,8 @@ "getting_input": "This is the agent's final answer: {final_answer}\n\n", "summarizer_system_message": "You are a helpful assistant that summarizes text.", "sumamrize_instruction": "Summarize the following text, make sure to include all the important information: {group}", - "summary": "This is a summary of our conversation so far:\n{merged_summary}" + "summary": "This is a summary of our conversation so far:\n{merged_summary}", + "manager_request": "Your best answer to your coworker asking you this, accounting for the context shared." }, "errors": { "force_final_answer_error": "You can't keep going, this was the best you could do.\n {formatted_answer.text}",