# RASA not working with ollama

**URL:** <https://forum.rasa.com/t/rasa-not-working-with-ollama/63399>\
**Category:** Rasa CALM\
**Created:** [September 12, 2024, 8:51am UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399 "2024-09-12T08:51:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjukta.bs](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sanjukta.bs/32/24453_2.png) [@Sanjukta.bs](https://forum.rasa.com/u/Sanjukta.bs)\
**Post date:** [September 12, 2024, 8:51am UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399/1 "2024-09-12T08:51:02Z")

</div>

This is my config file as using provider it is asking for open api key.

```auto
recipe: default.v1
language: en
pipeline:
- name: SingleStepLLMCommandGenerator
  llm:
    type: ollama
    model: llma3model
    base_url: http://localhost:11434

  prompt_template: prompt_templates/time_aware_prompt.jinja2
  flow_retrieval:
    active: false

policies:
- name: FlowPolicy
assistant_id: 20240911-121521-recursive-jersey

```

While it is generating response but it is taking a lot of time to generate that I keep getting this warning

```auto
(venv) D:\Sanjukta_rasa>rasa inspect
2024-09-12 13:30:49 INFO rasa.tracing.config - No endpoint for tracing type available in endpoints.yml,tracing will not be configured.
2024-09-12 13:31:01 INFO root - Connecting to channel 'rasa.core.channels.development_inspector.DevelopmentInspectInput' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2024-09-12 13:31:02 INFO root - Starting Rasa server on http://0.0.0.0:5005
2024-09-12 13:31:23 INFO rasa.core.processor - Loading model models\20240912-132942-delicious-panel.tar.gz...
2024-09-12 13:31:23 WARNING rasa.dialogue_understanding.generator.llm_based_command_generator - [warning] Disabling flow retrieval can cause issues when there are a large number of flows to be included in the prompt. For moreinformation see:
https://rasa.com/docs/rasa-pro/concepts/dialogue-understanding#how-the-llmcommandgenerator-works event_key=llm_based_command_generator.flow_retrieval.disabled
2024-09-12 13:31:25 INFO root - Rasa server is up and running.
[2024-09-12 13:31:26 +0530] [12816] [INFO] Starting worker [12816]
2024-09-12 13:31:26 INFO sanic.server - Starting worker [12816]
D:\Sanjukta_rasa\venv\lib\site-packages\langchain\llms\ollama.py:164: RuntimeWarning: coroutine 'AsyncCallbackManagerForLLMRun.on_llm_new_token' was never awaited
  run_manager.on_llm_new_token(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

```

Can anyone explain how to work a way around of this? I have tried various configurations but none of them seems to work properly. Any responses are appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![Cabrell](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Cabrell](https://forum.rasa.com/u/Cabrell)\
**Post date:** [September 23, 2024, 11:09am UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399/2 "2024-09-23T11:09:15Z")

</div>

Hi Did you find any solution for your problem? I’m facing the same problem

---

<div class="post-metadata">

**Author:** ![muzzammil](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/muzzammil/32/24185_2.png) [@muzzammil](https://forum.rasa.com/u/muzzammil)\
**Post date:** [September 26, 2024, 12:25pm UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399/3 "2024-09-26T12:25:05Z")

</div>

@Sanjukta.bs did you find a work around of this?

---

<div class="post-metadata">

**Author:** ![pkchoudhary1211](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pkchoudhary1211/32/5790_2.png) [@pkchoudhary1211](https://forum.rasa.com/u/pkchoudhary1211)\
**Post date:** [September 27, 2024, 3:19pm UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399/4 "2024-09-27T15:19:17Z")

</div>

Try enabling it again, as it can help with response times. Also, double-check that your API key.

---

<div class="post-metadata">

**Author:** ![Elliot94](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@Elliot94](https://forum.rasa.com/u/Elliot94)\
**Post date:** [September 27, 2024, 6:52pm UTC](https://forum.rasa.com/t/rasa-not-working-with-ollama/63399/5 "2024-09-27T18:52:24Z")

</div>

I get the same warning with Ollama, and the response times are so bad that its quicker to use GPT-4. But what API do you mean here exactly?
