# Crew\_Base not find LLM

**URL:** <https://community.crewai.com/t/crew-base-not-find-llm/674>\
**Category:** CrewAI Community Support\
**Created:** [October 7, 2024, 5:44pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674 "2024-10-07T17:44:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 5:44pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/1 "2024-10-07T17:44:24Z")

</div>

I am having this issue in the new version of CrewAI.  
I never had this issue in the later version of some of the tutorials.

 ![image_2024-10-07_194230934](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/1X/bc36d7bfdae45971681425e55fcbceef88b52ef8.png)  
error:

```auto
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ru/Documents/personal_agents/src/press_office/main.py", line 24, in run
    PressOfficeCrew().crew().kickoff(inputs=inputs)
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 34, in __init__
    self.map_all_agent_variables()
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 73, in map_all_agent_variables
    self._map_agent_variables(
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 93, in _map_agent_variables
    if llm := agent_info.get("llm"):
AttributeError: 'NoneType' object has no attribute 'get'

```

Any chance you can tell me how I am calling the Agent wrong? My yaml agent file is sometimes also not parsed correctly.  
I am wondering of some biog change happened and i am just using the wrong ways

Please let me know, I want to keep leaning and using this. Its a great tool

Many greetings

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 5:52pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/2 "2024-10-07T17:52:20Z")

</div>

Others seem to having siilar issues: @moto can you assist?

---

<div class="post-metadata">

**Author:** ![moto](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@moto](https://community.crewai.com/u/moto)\
**Post date:** [October 7, 2024, 6:14pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/3 "2024-10-07T18:14:30Z")

</div>

What happens when you just use llm=llm in the agent def?

---

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 7:07pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/4 "2024-10-07T19:07:20Z")

</div>

Nothing, exact same behavior.

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 7:35pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/5 "2024-10-07T19:35:17Z")

</div>

Hi @Ruben_Casillas,  
Let me see if I can help 🫰

It ‘smells’ like an issue that people have been having with many LLM’s, local & remote since CrewAI started to use [lightLLM](https://github.com/ModelTC/lightllm) . Check that link and have a ‘quick’ read of the README, list of supported models, etc.  
I’ll keep looking to see if connecting to local models require a config change, or a change in method of how you connect.  
I’ll update here.

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 7:41pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/6 "2024-10-07T19:41:38Z")

</div>

This [thread](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/6) discusses the same issue & has a solution.

Best of luck, come back to me if you still have issues

---

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 7:52pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/7 "2024-10-07T19:52:21Z")

</div>

I tried the solution but had no effect.  
I use a local Ollama with Llama3.1 and worked perfectly before update.  
The Llama models are supported in LiteLLM, and I changed the name to api\_base instead of base\_url.  
Nothing changed for me.

```auto
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ru/Documents/personal_agents/src/press_office/main.py", line 24, in run
    PressOfficeCrew().crew().kickoff(inputs=inputs)
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 34, in __init__
    self.map_all_agent_variables()
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 73, in map_all_agent_variables
    self._map_agent_variables(
  File "/home/ru/Documents/personal_agents/.venv/lib/python3.10/site-packages/crewai/project/crew_base.py", line 93, in _map_agent_variables
    if llm := agent_info.get("llm"):
AttributeError: 'NoneType' object has no attribute 'get'

```

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 8:00pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/8 "2024-10-07T20:00:06Z")

</div>

Another [thread](https://community.crewai.com/t/a-question-regarding-using-open-source-llms-through-ollama-with-crewai/397/5) with the same/similar issue:

Let’s try again 🫰

---

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 8:13pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/9 "2024-10-07T20:13:24Z")

</div>

Perhaps we are trying in the wrong place, the behavior is the same.  
☹  
any other idea? Looking forward to try anything

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 8:15pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/10 "2024-10-07T20:15:04Z")

</div>

I’ll see who is bout as I’m new to CrewAI myself (3 months) and see if I can get you some help.

UPDATE: meythod ‘get’! are you using function calling on the LLM?  
Some still have this issue with function calling on local ollama.

2 mins

---

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 8:16pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/11 "2024-10-07T20:16:57Z")

</div>

I am willing to put some hours as well, I am also new in the scene but would like to dive in.  
If I can help, let me know

---

<div class="post-metadata">

**Author:** ![Ruben\_Casillas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ruben_casillas/32/439_2.png) [@Ruben\_Casillas](https://community.crewai.com/u/Ruben_Casillas)\
**Post date:** [October 7, 2024, 8:21pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/12 "2024-10-07T20:21:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/1X/8359d4b8f0fd0b0073175434922fb9119a88bcd6.png)  
no, I also did not understand why.  
I though it was more related to the API

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [October 7, 2024, 8:30pm UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/13 "2024-10-07T20:30:13Z")

</div>

I think this is one that @matt will need to look at for you.

FYI: In that code you have llm assigned twice! maybe change one to llmC for chat.

I’ll keep asking, looking for you. I know how frustrating it can be just sitting there looking at your code when it’s not workingg & you have no answers, etc.

We’ll get there!

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [October 8, 2024, 12:42am UTC](https://community.crewai.com/t/crew-base-not-find-llm/674/14 "2024-10-08T00:42:02Z")

</div>

@Ruben_Casillas Can you do me a favor and zip up your code and email it to me? [matt@crewai.com](mailto:matt@crewai.com)
