fix: reorder model_name definition

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-09 21:33:57 +00:00
parent 2086a4b530
commit 4af5d0801b

View File

@@ -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)