mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 00:52:24 -05:00
[PR #19948] [CLOSED] feat: enhance memory system with user-controllable toggles #41038
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/19948
Author: @silentoplayz
Created: 12/14/2025
Status: ❌ Closed
Base:
dev← Head:memory-settings-clean📝 Commits (2)
e71a031feat: auto memory toggle1cab9dcfeat: Memory feature revamp📊 Changes
6 files changed (+297 additions, -34 deletions)
View changed files
📝
backend/open_webui/routers/chats.py(+35 -3)📝
backend/open_webui/utils/chat.py(+133 -1)📝
backend/open_webui/utils/middleware.py(+28 -3)📝
src/lib/apis/index.ts(+1 -1)📝
src/lib/components/chat/Chat.svelte(+1 -1)📝
src/lib/components/chat/Settings/Personalization.svelte(+99 -25)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
Active Memory Recall toggle - Control whether stored memories are injected into chat context
Inject Profile Info toggle - Include user's name, bio, and gender in chat context as memory
Automatic Memory Creation toggle - Enable/disable automatic extraction of memories from conversations
Custom Memory Extraction Prompt - Define how the LLM should extract and format memories
These settings are placed in the Personalization section of User Settings, integrating naturally with existing personalization options.
Added
Active Memory Recalltoggle in Personalization settings - enables/disables memory injection during chatInject Profile Infotoggle - injects user account info (name, bio, gender) into chat contextAutomatic Memory Creationtoggle - enables automatic memory extraction after chat completionMemory Extraction Prompttextarea - allows custom prompt for memory extraction formatchat_memory_handlerinmiddleware.pynow supports profile info injection/chats/completedendpoint for post-chat processing (memory extraction)Changed
Active Memory Recallto be enabled for memory injection.Deprecated
Removed
chat.py
generate_chat_completion(now handled exclusively by middleware)Fixed
asyncembedding function calls that would cause vector DB upsert failuresSecurity
Breaking Changes
Additional Information
middleware.pyviachat_memory_handler.chat.pyviachat_completed.Screenshots or Videos
Screencast from 2025-12-14 10-53-27.webm
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.