mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-09 16:09:10 +00:00
refac
This commit is contained in:
parent
7f182ea063
commit
80af65c24a
2 changed files with 10 additions and 3 deletions
|
|
@ -726,7 +726,11 @@ async def add_memory(
|
|||
__user__: dict = None,
|
||||
) -> str:
|
||||
"""
|
||||
Save a user-provided preference, fact, or instruction as memory for future chats.
|
||||
Save enduring information that can improve future chats.
|
||||
|
||||
Save stable preferences, goals, projects, relationships, habits, and standing instructions.
|
||||
Do not save one-off activity, meals, routine daily events, temporary mood, or other short-lived details
|
||||
unless the user explicitly asks you to remember them.
|
||||
|
||||
:param content: The memory content to store
|
||||
:param type: Use "user" for facts/preferences about the user, or "context" for other durable context
|
||||
|
|
@ -760,10 +764,12 @@ async def update_memory(
|
|||
__user__: dict = None,
|
||||
) -> str:
|
||||
"""
|
||||
Apply a batch of memory changes after learning durable information.
|
||||
Apply a batch of memory changes after learning enduring information.
|
||||
|
||||
Use type "user" for facts, preferences, or instructions about the user.
|
||||
Use type "context" for other durable context that may help future chats.
|
||||
Do not save one-off activity, meals, routine daily events, temporary mood, or other short-lived details
|
||||
unless the user explicitly asks you to remember them.
|
||||
Path is optional. Use it as a stable memory address to group related memories.
|
||||
Prefer an existing path from list_memory_paths when one fits.
|
||||
Leave path empty when no useful grouping is clear.
|
||||
|
|
|
|||
|
|
@ -535,7 +535,8 @@ Memory types:
|
|||
- context: other durable context that may help future chats for this user account.
|
||||
|
||||
Rules:
|
||||
- Save only information likely to matter in future chats.
|
||||
- Save enduring details that can improve future conversations.
|
||||
- Do not save one-off activity, meals, temporary mood, routine daily events, or other short-lived details unless the user explicitly asks to remember them.
|
||||
- Do not save secrets, credentials, transient task steps, or unsupported guesses.
|
||||
- Use path when there is a clear path for the memory.
|
||||
- Leave path empty when there is no clear place for the memory.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue