mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-09 05:19:20 -05:00
[GH-ISSUE #753] Negative Keep Alive value won't work #27731
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nihilimbo on GitHub (Feb 16, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/753
Bug Report
Description
Bug Summary:
Ollama Web UI will throw a "Ollama: time: missing unit in duration -1" when trying to use -1 as a Keep Alive value in the Advanced tab of the Settings. According to Ollama documentation a -1 value in the keep_alive header instructs Ollama to keep the model loaded indefinitely
Steps to Reproduce:
Go to Settings->Advanced and set Keep Alive to -1, then try to send a message to any model
Expected Behavior:
Chat would work normally and the last used model will be kept loaded in Ollama indefinitely
Actual Behavior:
Got "Ollama: time: missing unit in duration -1" and "Uh-oh! There was an issue connecting to Ollama" errors when trying to send a message after setting KA to -1
Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
[Include relevant Docker container logs, if applicable]
Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
Installation Method
[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.]
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@justinh-rahb commented on GitHub (Feb 16, 2024):
Confirming this, I get the same results.
-1is a valid value forkeep_alivein Ollama's API so our interface should support this.@spammenotinoz commented on GitHub (May 13, 2024):
Really dumb question, Advanced settings are per USER saved on the local browser, and Ollama updates keep alive per api call, so I am not really following how this fix addresses the keep alive issue.
When the model is loaded, it works really well, but wait 5mins and TTFS takes minutes.
There is now an Ollama ENV variable called "OLLAMA_KEEP_ALIVE", syntax is as follows.