[Question]: Ollama connection error
Describe your problem
I tried to connect ollama LLMs models but I recive the following error: Fail to access model! Error 102 as you in screen shot. Also I ried with varius model but it dosen't work.
I don't think the IP should be like this. How about 127.17.0.1?
Dosen't work! I recive the following Error.
But in the debug console I see the add_llm response return 200.
I Have the same thins with other providers such as Anthropic and Mistral.
@KevinHuSh I just fix it on Windows I leave the guide bellow:
1)Set User Environment Variables for Ollama in : Example: Variable name: OLLAMA_HOST Variable value: 0.0.0.0:11434 link guide: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server
2)Fin your IP Address using ipconfig from cmd line(don't use localhost) ex: 10.0...... or 192.168..... and set up it into URL base ex 192.168.0.10:11434 and enter model name.
出现这个问题,一般是因为我们的RAG搭建在容器里面,如果没有做端口穿透的话,RAG就会尝试访问容器内的11434端口,从而造成访问失败。 首先,我们需要更改Ollama的端口监听,使其在所有域名上都生效。 系统属性→环境变量 新建一个环境变量,具体配置如下: 变量名:OLLAMA_HOST 变量值::11434 冒号前保持为空相当于在所有IPv4和IPv6地址上监听。 点击确定并保存。 退出Ollama:右下角Ollama→quit 然后重新打开。 再次访问Ollama地址,看看是不是可以用了,你也可以用宿主机IP作为访问IP试一下。 English: This problem usually occurs because our RAG is built inside a container. If port penetration is not done, the RAG will attempt to access port 11434 inside the container, resulting in access failure. Firstly, we need to modify Ollama's port listening to make it effective on all domains. System Properties → Environment Variables Create a new environment variable with the following specific configuration: Variable Name: OLLAMA_HOST Variable value: :11434 Keeping the colon blank is equivalent to listening on all IPv4 and IPv6 addresses. Click OK and save. Exit Olama: Olama in the bottom right corner → quit Then reopen it. Visit the Olama address again and see if it works. You can also try using the host IP as the access IP.
@RengarWang Dosen't work!