refac
This commit is contained in:
@@ -93,6 +93,10 @@ from open_webui.tools.builtin import (
|
||||
list_automations,
|
||||
toggle_automation,
|
||||
delete_automation,
|
||||
search_calendar_events,
|
||||
create_calendar_event,
|
||||
update_calendar_event,
|
||||
delete_calendar_event,
|
||||
)
|
||||
|
||||
import copy
|
||||
@@ -552,6 +556,12 @@ async def get_builtin_tools(
|
||||
[create_automation, update_automation, list_automations, toggle_automation, delete_automation]
|
||||
)
|
||||
|
||||
# Calendar tools - search/create/update/delete events
|
||||
if is_builtin_tool_enabled('calendar'):
|
||||
builtin_functions.extend(
|
||||
[search_calendar_events, create_calendar_event, update_calendar_event, delete_calendar_event]
|
||||
)
|
||||
|
||||
for func in builtin_functions:
|
||||
callable = await get_async_tool_function_and_apply_extra_params(
|
||||
func,
|
||||
|
||||
Reference in New Issue
Block a user