mindsdb / mindsdb

Platform for building AI that can learn and answer questions over federated data.
https://mindsdb.com
Other
26.84k stars 4.89k forks source link

[Bug]: [ollama_engine]: ConnectionError: HTTPConnectionPool(host='localhost', port=11434) #9450

Open fahdmirza opened 4 months ago

fahdmirza commented 4 months ago

Short description of current behavior

Hi, On Ubuntu 22.04, My ollama is already installed and I have got llama3 present. I have installed Mindsdb and I am able to access it in browser. In Integration, it says Ollama is installed.

So I created ollama engine in mindsdb sql editor and it was successful:

CREATE ML_ENGINE ollama_engine FROM ollama;

but when I run next the following command in sql editor of mindsdb:

CREATE MODEL llama3_model PREDICT completion USING engine = 'ollama_engine', model_name = 'llama3';

I get following error:

[ollama_engine]: ConnectionError: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/tags (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused'))

I can confirm that ollama is running on local host and on port 11434. I have also tried following with same error: CREATE MODEL ollama_model PREDICT completion USING engine = 'ollama_engine', -- engine name as created via CREATE ML_ENGINE model_name = 'llama3', -- model run with 'ollama run model-name' ollama_serve_url = 'http://localhost:11434';

any help please?

Video or screenshots

No response

Expected behavior

No response

How to reproduce the error

No response

Anything else?

No response

fahdmirza commented 4 months ago

Also tried following and same error:

CREATE MODEL ollama_model PREDICT completion USING engine = 'ollama_engine', -- engine name as created via CREATE ML_ENGINE model_name = 'llama3', -- model run with 'ollama run model-name' ollama_serve_url = 'http://host.docker.internal:11434';

[ollama_engine]: ConnectionError: HTTPConnectionPool(host='host.docker.internal', port=11434): Max retries exceeded with url: /api/tags (Caused by NameResolutionError(": Failed to resolve 'host.docker.internal' ([Errno -2] Name or service not known)"))

MinuraPunchihewa commented 4 months ago

Hey @fahdmirza, I can confirm that I am able to replicate this issue. I will have a look at fixing this.

parthiv11 commented 1 month ago

not getting this error, got #9953 trying to solve this,

please confirm this

xettrisomeman commented 2 weeks ago

Still not fixed. :|

parthiv11 commented 2 weeks ago

What error are you getting, and make sure use latest mindsdb