From 68e1444ed8decff8a0008a2a6bfcf6d09c6bb202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Thu, 2 May 2024 23:39:56 -0300 Subject: [PATCH] updating manager llm pydantic error --- src/crewai/crew.py | 4 ++-- tests/crew_test.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index d36d80733..05ba8f30e 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -175,8 +175,8 @@ class Crew(BaseModel): not self.manager_llm and not self.manager_agent ): raise PydanticCustomError( - "missing_manager_llm", - "Attribute `manager_llm` is required when using hierarchical process.", + "missing_manager_llm_or_manager_agent", + "Attribute `manager_llm` or `manager_agent` is required when using hierarchical process.", {}, ) return self diff --git a/tests/crew_test.py b/tests/crew_test.py index f120612ec..8e439596e 100644 --- a/tests/crew_test.py +++ b/tests/crew_test.py @@ -918,8 +918,6 @@ def test_crew_log_file_output(tmp_path): def test_manager_agent(): from unittest.mock import patch - from langchain_openai import ChatOpenAI - task = Task( description="Come up with a list of 5 interesting ideas to explore for an article, then write one amazing paragraph highlight for each idea that showcases how good an article about this topic could be. Return the list of ideas with their paragraph and your notes.", expected_output="5 bullet points with a paragraph for each idea.", @@ -930,7 +928,6 @@ def test_manager_agent(): goal="Manage the crew and ensure the tasks are completed efficiently.", backstory="You're an experienced manager, skilled in overseeing complex projects and guiding teams to success. Your role is to coordinate the efforts of the crew members, ensuring that each task is completed on time and to the highest standard.", allow_delegation=False, - llm=ChatOpenAI(temperature=0, model="gpt-4"), ) crew = Crew(