# Ollama integration with Nexcloud

**URL:** <https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302>\
**Category:** ℹ️ Support\
**Created:** [January 29, 2024, 5:02pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302 "2024-01-29T17:02:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onzem](https://help.nextcloud.com/user_avatar/help.nextcloud.com/onzem/32/58371_2.png) [@Onzem](https://help.nextcloud.com/u/Onzem)\
**Post date:** [January 29, 2024, 5:02pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/1 "2024-01-29T17:02:56Z")

</div>

I thought I’d would be really swell to have a Nextcloud app that can connect with Ollama, so users (all right, just now just me) can have an conversation with my personal AI.

I’d like to pay for it if necessary (although I’m not rich at alll)

---

<div class="post-metadata">

**Author:** ![Mehdi\_BELKHAYAT](https://help.nextcloud.com/user_avatar/help.nextcloud.com/mehdi_belkhayat/32/58615_2.png) [@Mehdi\_BELKHAYAT](https://help.nextcloud.com/u/Mehdi_BELKHAYAT)\
**Post date:** [February 4, 2024, 9:15am UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/2 "2024-02-04T09:15:12Z")

</div>

HI !

it is already possible to make ollama’s api compatible to openai format thanks to : [https://litellm.ai/](https://litellm.ai/)

It works well, and easy to setup … i can do all the gpt stuff like prompting, summarizing … all text tasks … but i have no result yet on generating images or using the voice transcription, as stablediffusion and whisper are not on ollama 's modele library yet … if you have some good advice …

Reminder : you have to install before openai application and the nextcloud assistant module before pointing your api url (from openai module in administration menu) and select your LLM

Here is some docs found on how to implement whisper on ollama (have not read it yet) :  
[https://medium.com/@kolbeuk/prototyping-open-source-speech-recognition-and-translation-ca571b3c4293](https://medium.com/@kolbeuk/prototyping-open-source-speech-recognition-and-translation-ca571b3c4293)

---

<div class="post-metadata">

**Author:** ![Onzem](https://help.nextcloud.com/user_avatar/help.nextcloud.com/onzem/32/58371_2.png) [@Onzem](https://help.nextcloud.com/u/Onzem)\
**Post date:** [February 8, 2024, 7:49pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/3 "2024-02-08T19:49:20Z")

</div>

Thank you 🙂 I’ll check it out the next week. for the rest, I’m just figuring it all out 😉

---

<div class="post-metadata">

**Author:** ![gc1984](https://help.nextcloud.com/letter_avatar/gc1984/32/5_5575768a8748004e209b776fc1b2916d.png) [@gc1984](https://help.nextcloud.com/u/gc1984)\
**Post date:** [March 8, 2024, 11:33am UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/4 "2024-03-08T11:33:36Z")

</div>

Hi, not OP, but how did you manage this?

I installed ollama with a litellm model, but i only get errors when using the assistant;

code: “ERR\_BAD\_REQUEST”  
​  
config: Object { timeout: 0, xsrfCookieName: “XSRF-TOKEN”, xsrfHeaderName: “X-XSRF-TOKEN”, … }  
​  
message: “Request failed with status code 400”  
​  
name: “AxiosError”  
​  
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }  
​  
response: Object { data: “LanguageModel call using provider LocalAI integration failed: OpenAI/LocalAI request failed: API request error: model ‘gpt-3.5-turbo’ not found, try pulling it first”, status: 400, statusText: “”, … }  
​  
How did you set it up at your instance?

---

<div class="post-metadata">

**Author:** ![papiche](https://help.nextcloud.com/user_avatar/help.nextcloud.com/papiche/32/57529_2.png) [@papiche](https://help.nextcloud.com/u/papiche)\
**Post date:** [August 26, 2024, 7:34pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/5 "2024-08-26T19:34:18Z")

</div>

Willing to activate IA assistant too.  
[https://docs.nextcloud.com/server/latest/admin\_manual/ai/index.html](https://docs.nextcloud.com/server/latest/admin_manual/ai/index.html)

Got those 3 App installed

 ![Capture d’écran du 2024-08-26 21-25-28](https://help.nextcloud.com/uploads/default/original/3X/c/0/c0a14b7040eede36470bfc98c3e13b9b7ae397eb.png)

Config LocalAI server (pointing to localhost [ollama](https://ollama.com/))

 ![Capture d’écran du 2024-08-26 21-29-13](https://help.nextcloud.com/uploads/default/original/3X/b/2/b290f767a2ffc1bdae1f0d7d6670c0bb1ed03028.png)

But nothing is working  
Anyone have a better experience to share ?

---

<div class="post-metadata">

**Author:** ![meonkeys](https://help.nextcloud.com/user_avatar/help.nextcloud.com/meonkeys/32/27937_2.png) [@meonkeys](https://help.nextcloud.com/u/meonkeys)\
**Post date:** [August 27, 2024, 4:55am UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/6 "2024-08-27T04:55:41Z")

</div>

No luck here either with open-webui. (My workaround is to use LocalAI).

I have an [open-webui](https://openwebui.com/) chat working. I’m trying out the `mistral-nemo` model. Happy to share my Docker compose file if anyone wants it.

Nextcloud can’t use open-webui.

Starting at `/settings/admin/ai` in Nextcloud, I’m able to enter my open-webui server URL and API key. I then see a GET to `/v1/models` in the open-webui server log, but, confusingly, the XHR request from the Nextcloud AI settings page to `/apps/integration_openai/models` throws a HTTP 500 server error (in the browser console only – `/settings/admin/ai` doesn’t show an error). Maybe it doesn’t like the response from open-webui?

I’m able to try text generation and I see POSTs from Nextcloud to `/v1/chat/completions` when I do, but that endpoint always returns a HTTP 500 server error. open-webui says `ERROR: Exception in ASGI application`, a big stack trace, then `IndexError: tuple index out of range`.

These look relevant/related, or at least may contain hints on how we might get this to work:

- [OpenAI API compatibility · Issue #305 · ollama/ollama · GitHub](https://github.com/ollama/ollama/issues/305)
- [[Bug]: OpenAI error: Client error: `POST http://192.168.73.78:8000/v1/chat/completions` resulted in a `404 Not Found` response: File Not Found · Issue #44 · nextcloud/integration\_openai · GitHub](https://github.com/nextcloud/integration_openai/issues/44)

---

<div class="post-metadata">

**Author:** ![papiche](https://help.nextcloud.com/user_avatar/help.nextcloud.com/papiche/32/57529_2.png) [@papiche](https://help.nextcloud.com/u/papiche)\
**Post date:** [September 2, 2024, 7:56pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/7 "2024-09-02T19:56:21Z")

</div>

Connecting NextCloud with open webui finish in 500 errors too

> [@meonkeys](#):
>
> My workaround is to use LocalAI

I tried by launching LocalAI (through docker)  
Changing URL for this one does not make it work.

How did you configure NextCLoud with LocalAI?

---

<div class="post-metadata">

**Author:** ![papiche](https://help.nextcloud.com/user_avatar/help.nextcloud.com/papiche/32/57529_2.png) [@papiche](https://help.nextcloud.com/u/papiche)\
**Post date:** [September 5, 2024, 1:47pm UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/8 "2024-09-05T13:47:52Z")

</div>

I think I understood how to activate IA in NextCloud.  
It needs App like “[NextCLoud Assistant](https://docs.nextcloud.com/server/latest/admin_manual/ai/app_assistant.html#installation)” & “[Context Chat](https://docs.nextcloud.com/server/latest/admin_manual/ai/app_context_chat.html#ai-app-context-chat)”

… but also [AppAPI](https://docs.nextcloud.com/server/latest/admin_manual/ai/app_api_and_external_apps.html) and extra ExtApps  
like the _context\_chat\_backend_ ExternalApp

 ![ExtApps](https://help.nextcloud.com/uploads/default/original/3X/0/9/099b96a9cd46391883817569c08f04fe9fa36f4f.jpeg)

Not sure what [llm2](https://docs.nextcloud.com/server/latest/admin_manual/ai/app_llm2.html) is providing compared with [LocalAI](https://docs.nextcloud.com/server/latest/admin_manual/ai/ai_as_a_service.html) which seems to be used by [Mail+LLM](https://docs.nextcloud.com/server/latest/admin_manual/groupware/mail.html#mail-llm-processing)

But activating LocalAI with Ollama leads to instability (Memory Overflow ?)  
So I did not activate LocalAI and kept [ollama+open-webui](https://github.com/open-webui/open-webui) in a “External Link” menu.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:51am UTC](https://help.nextcloud.com/t/ollama-integration-with-nexcloud/180302/9 "2025-01-16T08:51:53Z")

</div>


