Failed to convert text into a Pydantic model due to error: 'NoneType' object has no attribute 'function_calling_llm'
Hi all, I am blocked with this error perhaps because of the following TODO: is there any ways you can help me getting unblocked? located at: site-packages/crewai/crew.py Line: 648
error:
```_execute_single_listener] Error in method write_chapters: Failed to convert text into a Pydantic model due to error: 'NoneType' object has no attribute 'function_calling_llm'
Traceback (most recent call last):
File "/Users/.... /src/write_a_book_with_flows/.venv/lib/python3.11/site-packages/crewai/utilities/converter.py", line 37, in to_pydantic
result = self.model.model_validate_json(response)
```
More context:
```
for agent in self.agents:
agent.i18n = i18n
# type: ignore[attr-defined] # Argument 1 to "_interpolate_inputs" of "Crew" has incompatible type "dict[str, Any] | None"; expected "dict[str, Any]"
agent.crew = self # type: ignore[attr-defined]
agent.set_knowledge(crew_embedder=self.embedder)
# TODO: Create an AgentFunctionCalling protocol for future refactoring. # <------THIS ONE
if not agent.function_calling_llm: # type: ignore # "BaseAgent" has no attribute "function_calling_llm"
agent.function_calling_llm = self.function_calling_llm # type: ignore # "BaseAgent" has no attribute "function_calling_llm"
```
0
2 comments
Ali S
1
Failed to convert text into a Pydantic model due to error: 'NoneType' object has no attribute 'function_calling_llm'
AI Developer Accelerator
skool.com/ai-developer-accelerator
Master AI & software development to build apps and unlock new income streams. Transform ideas into profits. 💡➕🤖➕👨‍💻🟰💰
Leaderboard (30-day)
Powered by