From 4af5d0801bb03e491be2a3086cd5a9f292548b84 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:33:57 +0000 Subject: [PATCH] fix: reorder model_name definition Co-Authored-By: Joe Moura --- src/crewai/crew.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index 2582acb7d..04a93abcc 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -1086,13 +1086,15 @@ class Crew(BaseModel): """Test and evaluate the Crew with the given inputs for n iterations concurrently using concurrent.futures.""" test_crew = self.copy() + # For backward compatibility, convert openai_model_name to llm + model_name = llm or openai_model_name or "gpt-4o-mini" self._test_execution_span = test_crew._telemetry.test_execution_span( test_crew, n_iterations, inputs, - llm or openai_model_name or "gpt-4o-mini", + model_name, ) - evaluator = CrewEvaluator(test_crew, openai_model_name or "gpt-4o-mini") + evaluator = CrewEvaluator(test_crew, llm=model_name) for i in range(1, n_iterations + 1): evaluator.set_iteration(i)