refac
This commit is contained in:
1 parent
bd6e0b61c2
commit
8e46450acd
11 files changed
+143
-65
No files matched your search
@@ -4,7 +4,7 @@ import sys
|
||||
from typing import Any
|
||||
|
||||
from fastapi import Request
|
||||
from open_webui.env import GLOBAL_LOG_LEVEL
|
||||
from open_webui.env import ENABLE_PLUGINS, GLOBAL_LOG_LEVEL
|
||||
from open_webui.models.functions import Functions
|
||||
from open_webui.models.users import UserModel
|
||||
from open_webui.socket.main import get_event_call, get_event_emitter
|
||||
@@ -17,6 +17,9 @@ log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def chat_action(request: Request, action_id: str, form_data: dict, user: Any):
|
||||
if not ENABLE_PLUGINS:
|
||||
raise Exception('Plugins are disabled by ENABLE_PLUGINS=false')
|
||||
|
||||
if '.' in action_id:
|
||||
action_id, sub_action_id = action_id.split('.')
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user