mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-03 10:17:43 -05:00
refac
This commit is contained in:
1 parent
46dce79eb0
commit
8a42aa53e8
11 files changed
+147
-12
No files matched your search
@@ -8,6 +8,7 @@ TERMINAL_CONTEXT_HEADER = 'X-Terminal-Context-Id'
|
||||
TERMINAL_CONTEXT_DEFAULT = 'default'
|
||||
TERMINAL_CONTEXT_TYPES = {'chat', 'automation'}
|
||||
TERMINAL_CONTEXT_ID_SOURCES = {'chat': 'chat_id', 'automation': 'automation_id'}
|
||||
TERMINAL_CHAT_UPLOAD_MODES = {'default', 'filesystem'}
|
||||
|
||||
|
||||
def is_terminal_orchestrator(connection: dict) -> bool:
|
||||
@@ -104,3 +105,9 @@ def terminal_contexts(connection: dict) -> dict:
|
||||
else:
|
||||
result[context] = {}
|
||||
return result
|
||||
|
||||
|
||||
def terminal_chat_uploads(connection: dict) -> str:
|
||||
"""Return normalized main-chat upload behavior for this connection."""
|
||||
value = (connection.get('config') or {}).get('chat_uploads')
|
||||
return value if value in TERMINAL_CHAT_UPLOAD_MODES else 'default'
|
||||
Reference in new issue
Block a user