调用ollama里的模型会话时长只有5分钟[Bug] #2310
-
💻 系统环境Other Linux 📦 部署环境Docker 🌐 浏览器Chrome 🐛 问题描述例如LobeChat调用Ollama里的llama3模型,首次提问,ollama会加载llama3模型,一直会话没问题,但一旦不提问后,5分钟模型会被卸载,当再次问问题,又要重新加载llama3模型,对于本地资源不是特别好的情况下,模型加载基本要达到30-60秒,用户体验比较差。 🚦 期望结果能在LobeChat的ollama模型里,设置保持会话时长。 📷 复现步骤No response 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
💻 System environmentOther Linux 📦 Deployment environmentDocker 🌐 BrowserChrome 🐛 Problem descriptionFor example, LobeChat calls the llama3 model in Ollama. If you ask a question for the first time, ollama will load the llama3 model. There is no problem for the whole session. However, once you do not ask questions, the model will be unloaded in 5 minutes. When you ask questions again, the llama3 model must be reloaded. For local When the resources are not particularly good, the model loading basically takes 30-60 seconds, and the user experience is relatively poor. 🚦 Expected resultsYou can set the duration of the session in LobeChat's ollama model. 📷 Steps to reproduceNo response 📝 Supplementary informationNo response |
Beta Was this translation helpful? Give feedback.
-
在 LobeChat 里做可能不一定行,你得自己设定 ollama 的环境变量吧? https://lobehub.com/zh/docs/self-hosting/examples/ollama#ollama-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F |
Beta Was this translation helpful? Give feedback.
-
It may not necessarily work in LobeChat. You have to set ollama's environment variables yourself, right? https://lobehub.com/en/docs/self-hosting/examples/ollama#ollama-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F |
Beta Was this translation helpful? Give feedback.
-
感谢,部署时加参数 -e OLLAMA_KEEP_ALIVE="5m" 可以控制模型保持会话的时长 |
Beta Was this translation helpful? Give feedback.
-
Thanks, add the parameter -e OLLAMA_KEEP_ALIVE="5m" when deploying to control the length of time the model maintains the session. |
Beta Was this translation helpful? Give feedback.
-
This issue is closed, If you have any questions, you can comment and reply. |
Beta Was this translation helpful? Give feedback.
在 LobeChat 里做可能不一定行,你得自己设定 ollama 的环境变量吧?
https://lobehub.com/zh/docs/self-hosting/examples/ollama#ollama-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F