refac
This commit is contained in:
@@ -68,6 +68,7 @@ from open_webui.tools.builtin import (
|
||||
list_knowledge_bases,
|
||||
list_memories,
|
||||
list_memory_paths,
|
||||
notify,
|
||||
query_knowledge_bases,
|
||||
query_knowledge_files,
|
||||
read_memory_path,
|
||||
@@ -503,6 +504,7 @@ async def get_builtin_tools(
|
||||
'channels.enable',
|
||||
'automations.enable',
|
||||
'calendar.enable',
|
||||
'ui.enable_user_webhooks',
|
||||
'subagents.enable',
|
||||
'subagents.background_enabled',
|
||||
)
|
||||
@@ -684,6 +686,13 @@ async def get_builtin_tools(
|
||||
[search_calendar_events, create_calendar_event, update_calendar_event, delete_calendar_event]
|
||||
)
|
||||
|
||||
if (
|
||||
is_builtin_tool_enabled('notifications')
|
||||
and config.get('ui.enable_user_webhooks')
|
||||
and await has_user_permission('webhooks')
|
||||
):
|
||||
builtin_functions.append(notify)
|
||||
|
||||
if getattr(request.state, 'internal', False) is True:
|
||||
from open_webui.utils.subagents import MUTATING_MEMORY_TOOLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user