mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
refactor: implement review suggestions
- Extract model conversion logic to _get_llm_instance helper method - Improve error message clarity - Simplify LLM instance creation in CrewEvaluator Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -36,10 +36,7 @@ class CrewEvaluator:
|
||||
|
||||
def __init__(self, crew, llm: Union[str, LLM]):
|
||||
self.crew = crew
|
||||
if isinstance(llm, str):
|
||||
self.llm = LLM(model=llm)
|
||||
else:
|
||||
self.llm = llm
|
||||
self.llm = LLM(model=llm) if isinstance(llm, str) else llm
|
||||
self._telemetry = Telemetry()
|
||||
self._setup_for_evaluating()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user