[PR #721] [MERGED] Added support for setting the new KeepAlive property to be sent to Ollama #7227

Closed
opened 2025-11-11 17:20:55 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/721
Author: @zabirauf
Created: 2/13/2024
Status: Merged
Merged: 2/13/2024
Merged by: @tjbck

Base: mainHead: u/zabirauf/keep-alive


📝 Commits (5)

  • 7053f2f Added Keep alive setting
  • 56966c4 fix: keep alive value should be string
  • 3057bfe chore: revert
  • 42b24cb fix: keep alive default value
  • bae30f2 chore: remove unused variable

📊 Changes

3 files changed (+40 additions, -3 deletions)

View changed files

📝 src/lib/components/chat/Settings/Advanced.svelte (+36 -1)
📝 src/routes/(app)/+page.svelte (+2 -1)
📝 src/routes/(app)/c/[id]/+page.svelte (+2 -1)

📄 Description

The change supports the new KeepAlive property from Ollama which keeps the model loaded for quicker response. https://github.com/ollama/ollama/pull/2146

The change includes

  1. Adding a new Keep Alive in the Settings > Advanced.
  2. The value being empty is default, in which case nothing is sent to chat/generate API
  3. If the value is set then the value is fetched from settings and sent to ollama when calling chat/generate API as keep_alive

TODO:

  • Validate that the request sent to ollama contains the set value

Related issue #596

Screenshot 2024-02-12 at 11 47 50 PM
Screenshot 2024-02-12 at 11 47 57 PM


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/721 **Author:** [@zabirauf](https://github.com/zabirauf) **Created:** 2/13/2024 **Status:** ✅ Merged **Merged:** 2/13/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `u/zabirauf/keep-alive` --- ### 📝 Commits (5) - [`7053f2f`](https://github.com/open-webui/open-webui/commit/7053f2f67dc9b20bffaa95a31909a16550a94f70) Added Keep alive setting - [`56966c4`](https://github.com/open-webui/open-webui/commit/56966c411b010125f41e8b3730dd0b7dbd9a4f33) fix: keep alive value should be string - [`3057bfe`](https://github.com/open-webui/open-webui/commit/3057bfe5a02a0e88a10aa1655d26253413f85af0) chore: revert - [`42b24cb`](https://github.com/open-webui/open-webui/commit/42b24cbb684a38c8f8f1da64132eaf06e8eb18b3) fix: keep alive default value - [`bae30f2`](https://github.com/open-webui/open-webui/commit/bae30f2756c2b61ee8007ece89764a8a8651f524) chore: remove unused variable ### 📊 Changes **3 files changed** (+40 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Settings/Advanced.svelte` (+36 -1) 📝 `src/routes/(app)/+page.svelte` (+2 -1) 📝 `src/routes/(app)/c/[id]/+page.svelte` (+2 -1) </details> ### 📄 Description The change supports the new KeepAlive property from Ollama which keeps the model loaded for quicker response. https://github.com/ollama/ollama/pull/2146 The change includes 1. Adding a new Keep Alive in the Settings > Advanced. 2. The value being empty is default, in which case nothing is sent to chat/generate API 3. If the value is set then the value is fetched from settings and sent to ollama when calling chat/generate API as `keep_alive` TODO: - [ ] Validate that the request sent to ollama contains the set value Related issue #596 ![Screenshot 2024-02-12 at 11 47 50 PM](https://github.com/ollama-webui/ollama-webui/assets/1104560/df96a5a9-2e1f-470e-9521-a29147502c8a) ![Screenshot 2024-02-12 at 11 47 57 PM](https://github.com/ollama-webui/ollama-webui/assets/1104560/7e0a6ce5-7182-4175-9866-4cbef0673f8c) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:20:55 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7227