apexive / apexive/odoo-llm

Error in trying to make Ollama to work

未关闭
#33 19 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
219
派生
159
PR 合并指标
30 天内没有已合并 PR

描述

Hello,

I would kindly ask any help setting up one of the LLM's in order to see the nodule's working. But I am hitting the wall here r.

I am en route to setup a development environment and I wanted to have Ollama as a provider for llm in an odoo 16 environment.

I have a docker stack with odoo 16 and postgres 15 inside it and I got an ollama container set up but I am constantly getting this error when defining the provider:

```
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1632, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1659, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1863, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6485, in onchange
defaults = self.default_get(missing_names)
File "/mnt/extra-addons/odoo-llm/llm/wizards/fetch_models_wizard.py", line 115, in default_get
for model_data in provider.list_models():
File "/mnt/extra-addons/odoo-llm/llm_ollama/models/ollama_provider.py", line 66, in ollama_models
response = self.client.list()
File "/usr/local/lib/python3.9/dist-packages/ollama/_client.py", line 567, in list
return self._request(
File "/usr/local/lib/python3.9/dist-packages/ollama/_client.py", line 178, in _request
return cls(**self._request_raw(*args, **kwargs).json())
File "/usr/local/lib/python3.9/dist-packages/ollama/_client.py", line 124, in _request_raw
raise ConnectionError(CONNECTION_ERROR_MESSAGE) from None
ConnectionError: Failed to connect to Ollama. Please check that Ollama is downloaded, running and accessible. https://ollama.com/download

The above server error caused the following client error:
null
```

docker PS gives me this:

![Image](https://github.com/user-attachments/assets/8a837605-9b1d-4da4-8e94-390509dac190)

I have tried all possible combinations of API base strings but the best I could get was a 404 message.

Any ideas?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。