Assigning Ollama LLM in DeepLearning Examples

I’m going through the new DeepLearning course Joao is presenting. I want to take the first Project example he gave and use Ollama with it so I can make a ton of experimental changes without costing a fortune.

I am importing LLM from crewai, I have a variable set using LLM(model= … and I thought I could just add llm: variable as the last entry for each agent in agents.yaml, but doing that gave me an error:

2024-10-23 16:10:25,804 - 6420 - llm.py-llm:178 - ERROR: Failed to get supported params: argument of type ‘NoneType’ is not iterable.

Is this to do with having the variable set in the main python file but is referenced in the config\agents.yaml file?

Any idea how to resolve this?

Never mind, found it. In the main python file there is an agents section there where the llm can be agent can be added as part of the Agent, eg:

Creating Agents

project_planning_agent = Agent(
llm=ollama,
config=agents_config[‘project_planning_agent’]
)