mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #11697] [MERGED] fix: Promote keep_alive to top-level in payload for Ollama API (dev branch) #77649
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11697
Author: @foraxe
Created: 3/14/2025
Status: ✅ Merged
Merged: 3/15/2025
Merged by: @tjbck
Base:
dev← Head:fix-keep-alive-top-level📝 Commits (2)
53448b3Fix: Promote keep_alive to top-level in payload for Ollama API on dev branch04046edAlternative Temp Fix: Uncomment to Keep Alive Forever📊 Changes
2 files changed (+11 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+1 -1)📝
backend/open_webui/utils/payload.py(+10 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
backend/open-webui/utils/payload.pybackend/open_webui/routers/ollama.pyDeprecated
Removed
Fixed
Modify the
apply_model_params_to_body_ollamafunction: In this function, extract keep_alive from options and add it as a top-level field to the payload.Modify the
convert_payload_openai_to_ollamafunction: In this function, if keep_alive exists in openai_payload, extract it and add it as a top-level field to ollama_payload.Security
Breaking Changes
Additional Information
Add:
payload["keep_alive"] = -1 # keep alive foreverTo ’
generate_chat_completion‘-https://github.com/open-webui/open-webui/issues/11694
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.