improve function llm logic

This commit is contained in:
Brandon Hancock
2025-01-09 16:29:29 -05:00
parent fb763885eb
commit 9f8293349c
2 changed files with 3 additions and 2 deletions

View File

@@ -142,7 +142,8 @@ class Agent(BaseAgent):
self.agent_ops_agent_name = self.role
self.llm = create_llm(self.llm)
self.function_calling_llm = create_llm(self.function_calling_llm)
if self.function_calling_llm and not isinstance(self.function_calling_llm, LLM):
self.function_calling_llm = create_llm(self.function_calling_llm)
if not self.agent_executor:
self._setup_agent_executor()

View File

@@ -246,7 +246,7 @@ class Crew(BaseModel):
if self.output_log_file:
self._file_handler = FileHandler(self.output_log_file)
self._rpm_controller = RPMController(max_rpm=self.max_rpm, logger=self._logger)
if self.function_calling_llm:
if self.function_calling_llm and not isinstance(self.function_calling_llm, LLM):
self.function_calling_llm = create_llm(self.function_calling_llm)
self._telemetry = Telemetry()