请问能否将Ollama服务器地址设置为默认http://host.docker.internal:11434,如果可以的话需要在哪里进行修改呢?
clear44 opened this issue · 4 comments
你的 ollama 在 docker 里面?
不是在ollama里面改,是在chatollama的设置里面改,看哔站https://www.bilibili.com/video/BV1SJ4m1h7K4/?spm_id_from=333.999.0.0&vd_source=c92dfbb730393cf1d7c12b9f058eb4ed 视频8:20位置。
@satrong @orange-GH 感谢您的回复!我的ollama在本地,chatollama在docker中,在前端页面中我已经实现了知识库问答,现在我想调用chatollama的api进行一些其他工作,但在docker的日志中发现了一点问题(状态码500),通过对比正常的问答日志,我怀疑可能是ollama的地址设置问题(采用了默认的http://127.0.0.1:11434),因此我想要其默认地址改为http://host.docker.internal:11434。以下是异常日志:
2024-07-04 18:12:56 chatollama-1 | URL: /api/models/chat User: null
2024-07-04 18:12:58 chatollama-1 | Chat with knowledge base with id: 4
2024-07-04 18:12:58 chatollama-1 | Knowledge base ZTE0 with embedding "nomic-embed-text:latest"
2024-07-04 18:12:58 chatollama-1 | Creating embeddings for Ollama served model: nomic-embed-text:latest
2024-07-04 18:12:58 chatollama-1 | Creating Chroma vector store
2024-07-04 18:12:58 chatollama-1 | Initializing ParentDocumentRetriever with RedisDocstore
2024-07-04 18:12:58 chatollama-1 | Redis client options: { host: 'redis', port: 6379, username: undefined, password: undefined }
2024-07-04 18:12:58 chatollama-1 | Chat with Ollama, host: http://127.0.0.1:11434
2024-07-04 18:12:58 chatollama-1 | User query: 判断正误:**共产党成立已经103周年了。
2024-07-04 18:12:58 chatollama-1 | Reformulated query: 判断正误:**共产党成立已经103周年了。
2024-07-04 18:12:58 chatollama-1 | [nuxt] [request error] [unhandled] [500] fetch failed
2024-07-04 18:12:58 chatollama-1 | at node:internal/deps/undici/undici:12502:13
2024-07-04 18:12:58 chatollama-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-07-04 18:12:58 chatollama-1 | at async OllamaEmbeddings._request (./.output/server/node_modules/@langchain/community/dist/embeddings/ollama.js:107:26)
2024-07-04 18:12:58 chatollama-1 | at async RetryOperation._fn (./.output/server/node_modules/p-retry/index.js:50:12)
@orange-GH @clear44 docker 或许你们可以在 #179 里面能找到答案