lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.72k stars 9.27k forks source link

[Bug] Ollama service is unavailable - MacOs - Vercel #2327

Open RVciTo opened 4 months ago

RVciTo commented 4 months ago

💻 Operating System

macOS

📦 Environment

Vercel / Zeabur / Sealos

🌐 Browser

Safari

🐛 Bug Description

I can't use Ollama as a language model.

Ollama service is unavailable. Please check if Ollama is running properly or if the cross-origin configuration of Ollama is set correctly.

Show Details

json { "host": "http://localhost:11434", "message": "please check whether your ollama service is available or set the CORS rules", "provider": "ollama" }

Also tried with IP address instead of Local Host. Did confirm that Ollama is running from http://localhost:11434

🚦 Expected Behavior

Being able to use Ollama as a language model

📷 Recurrence Steps

Run LobeChat through vercel Run Ollama Locally Try to use Ollama with LobeChat through vercel

📝 Additional Information

I followed those steps : https://lobehub.com/docs/usage/providers/ollama

lobehubbot commented 4 months ago

👀 @RVciTo

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Mrered commented 4 months ago

2337

lobehubbot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


2337

zzf8264 commented 4 months ago

同样的问题,是浏览器的问题 要换个浏览器就行了 那个 Safari浏览器 那个请求头有问题

lobehubbot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The same problem is caused by the browser. Just change the browser. There is something wrong with the Safari browser and the request header.

Mrered commented 4 months ago

同样的问题,是浏览器的问题 要换个浏览器就行了 那个 Safari浏览器 那个请求头有问题

我用 Arc 浏览器操作的,从来没有正常运行过

lobehubbot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The same problem is caused by the browser. Just change the browser. There is something wrong with the Safari browser and the request header.

I use Arc Browser to operate it and it has never worked properly.

vishnupriyavr commented 4 months ago

Works on Brave browser for me, atleast I am not getting the CORS error message and the connectivity check in the Language Model settings passes

arvinxx commented 4 months ago

@Mrered 换成 Chrome 试试呢?

Mrered commented 4 months ago

@Mrered 换成 Chrome 试试呢?

目前只安装了 Arc 和 Safari ,有点不想单独再装一个 Chrome 了,等之后再测吧,目前用 OpenCat 和 Open WebUI 可正常访问。

lobehubbot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@Mrered Try switching to Chrome?

At present, only Arc and Safari are installed. I don’t want to install Chrome separately. I will test it later. Currently, OpenCat and Open WebUI can be accessed normally.

RVciTo commented 4 months ago

Hello to the community, I confirm that it is working perfectly on Chrome but not on Safari. Is it plan to add Safari support or a documentation on how to make it work on Safari. I do not see at the moment how to personally provide a solution for this. Thank you everyone, wishing you a great day

arvinxx commented 3 months ago

@RVciTo I think it seems impossible for Safari. Because Safari don't allow https website to request http url.

RVciTo commented 3 months ago

Hello everyone.

I switched to Chrome to not have this issue anymore and it was working !

But now I have the same issue on Chrome...I did not change anything specific.

I tried Mozilla and Safari again, same issue. I use Ollama everyday, I checked the address and I do have "Ollama is running".

I also tries "launchctl setenv OLLAMA_ORIGINS "*"" in my terminal.

Anyone has an idea?

Thanks

oatmealm commented 1 month ago

Not working for me either. I have lobe-chat in a container and ollama on baremetal macos. Ollama is accesible from open-webui, every extension for chrome I've triend, emacs, command line tools... no problem at all. Yet 'lobe-chat' is not able to connect .

It is currently setup like this, run with docker-compos:

environment:
      OLLAMA_PROXY_URL: http://host.docker.internal:11434

The only way I was able to use it with ollama was to diable client fetch. I can work with models while the check still fails.