mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
refac
This commit is contained in:
parent
bf0c65cce6
commit
91853205e8
6 changed files with 14 additions and 1 deletions
|
|
@ -24,6 +24,10 @@ ENABLE_MEMORY_SYSTEM_CONTEXT=true
|
|||
# Set to true to add compact row/column stats to parsed CSV retrieval context.
|
||||
ENABLE_RAG_CSV_SUMMARY=false
|
||||
|
||||
# Opt in to automatic sending of URL-provided prompts (including links from other sites).
|
||||
# Defaults to prefill only; enabling this requires a backend restart.
|
||||
ENABLE_URL_QUERY_SUBMISSION=false
|
||||
|
||||
# Set to true to preserve backing file records, storage blobs, and per-file vectors when files are removed from knowledge bases.
|
||||
ENABLE_KNOWLEDGE_FILE_RETENTION=false
|
||||
|
||||
|
|
|
|||
|
|
@ -1742,6 +1742,8 @@ RESPONSE_WATERMARK = os.getenv('RESPONSE_WATERMARK', '')
|
|||
|
||||
IFRAME_CSP = os.getenv('IFRAME_CSP', '')
|
||||
|
||||
ENABLE_URL_QUERY_SUBMISSION = os.getenv('ENABLE_URL_QUERY_SUBMISSION', 'False').lower() == 'true'
|
||||
|
||||
USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS = (
|
||||
os.getenv('USER_PERMISSIONS_WORKSPACE_MODELS_ACCESS', 'False').lower() == 'true'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ from open_webui.config import (
|
|||
ENABLE_ADMIN_EXPORT,
|
||||
ENABLE_ONEDRIVE_BUSINESS,
|
||||
ENABLE_ONEDRIVE_PERSONAL,
|
||||
ENABLE_URL_QUERY_SUBMISSION,
|
||||
# OpenAI
|
||||
ENV,
|
||||
FRONTEND_BUILD_DIR,
|
||||
|
|
@ -2393,6 +2394,7 @@ async def get_app_config(request: Request):
|
|||
'enable_code_interpreter': config.get('code_interpreter.enable'),
|
||||
'enable_image_generation': config.get('image_generation.enable'),
|
||||
'enable_autocomplete_generation': config.get('task.autocomplete.enable'),
|
||||
'enable_url_query_submission': ENABLE_URL_QUERY_SUBMISSION,
|
||||
'enable_community_sharing': config.get('ui.enable_community_sharing'),
|
||||
'enable_message_rating': config.get('ui.enable_message_rating'),
|
||||
'enable_user_webhooks': config.get('ui.enable_user_webhooks'),
|
||||
|
|
|
|||
|
|
@ -2622,7 +2622,10 @@
|
|||
} else if ($page.url.searchParams.get('q')) {
|
||||
const q = $page.url.searchParams.get('q') ?? '';
|
||||
|
||||
if (($page.url.searchParams.get('submit') ?? 'true') === 'true') {
|
||||
if (
|
||||
$config?.features?.enable_url_query_submission &&
|
||||
($page.url.searchParams.get('submit') ?? 'true') === 'true'
|
||||
) {
|
||||
messageInput?.setText(q, () => submitHandler(prompt));
|
||||
} else {
|
||||
messageInput?.setText(q);
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ type Config = {
|
|||
enable_functions?: boolean;
|
||||
enable_tool_servers?: boolean;
|
||||
enable_autocomplete_generation: boolean;
|
||||
enable_url_query_submission?: boolean;
|
||||
enable_direct_connections: boolean;
|
||||
enable_direct_integrations?: boolean;
|
||||
enable_version_update_check: boolean;
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@
|
|||
terminalServers.set([]);
|
||||
});
|
||||
if (
|
||||
$config?.features?.enable_url_query_submission &&
|
||||
$page.url.searchParams.get('q') &&
|
||||
($page.url.searchParams.get('submit') ?? 'true') === 'true'
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue