mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
fix: temporary chats save sub-agent conversations on the server (#31573)
In a temporary chat, when the model handed a task to a sub-agent, the sub-agent's conversation with the task and its answer was saved on the server, although a temporary chat should leave nothing behind. The model is no longer offered sub-agents in temporary chats. Fixes #31567
This commit is contained in:
parent
3d70d43a1c
commit
c488f60e8b
1 changed files with 2 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ from open_webui.tools.builtin import (
|
|||
write_note,
|
||||
)
|
||||
from open_webui.utils.access_control import has_access, has_connection_access, has_permission
|
||||
from open_webui.utils.chat_id import is_saved_chat_id
|
||||
from open_webui.utils.chat_id import is_saved_chat_id, is_temporary_chat_id
|
||||
from open_webui.utils.headers import (
|
||||
bearer_auth_header,
|
||||
get_custom_headers,
|
||||
|
|
@ -650,6 +650,7 @@ async def get_builtin_tools(
|
|||
and config.get('subagents.enable')
|
||||
and getattr(request.state, 'internal', False) is not True
|
||||
and getattr(request.state, 'direct', False) is not True
|
||||
and not is_temporary_chat_id(metadata.get('chat_id'))
|
||||
):
|
||||
builtin_functions.extend([delegate_task, timer])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue