浏览代码

Merge pull request #5238 from open-webui/dev

0.3.20
Timothy Jaeryang Baek 7 月之前
父节点
当前提交
e2ef36b582
共有 66 个文件被更改,包括 441 次插入324 次删除
  1. 21 0
      CHANGELOG.md
  2. 1 5
      backend/.gitignore
  3. 2 0
      backend/open_webui/__init__.py
  4. 5 1
      backend/open_webui/apps/ollama/main.py
  5. 4 1
      backend/open_webui/apps/openai/main.py
  6. 6 2
      backend/open_webui/apps/webui/main.py
  7. 3 5
      backend/open_webui/apps/webui/routers/utils.py
  8. 11 18
      backend/open_webui/apps/webui/utils.py
  9. 9 35
      backend/open_webui/config.py
  10. 6 16
      backend/open_webui/env.py
  11. 40 17
      backend/open_webui/main.py
  12. 19 0
      backend/open_webui/migrations/scripts/revision.py
  13. 11 31
      backend/open_webui/migrations/versions/7e5b5dc7342b_init.py
  14. 8 84
      backend/open_webui/utils/misc.py
  15. 88 0
      backend/open_webui/utils/payload.py
  16. 38 17
      backend/open_webui/utils/task.py
  17. 2 2
      package-lock.json
  18. 1 1
      package.json
  19. 41 25
      src/lib/components/admin/Settings/Interface.svelte
  20. 14 10
      src/lib/components/chat/Chat.svelte
  21. 11 1
      src/lib/components/chat/ChatControls.svelte
  22. 2 2
      src/lib/components/chat/MessageInput/CallOverlay.svelte
  23. 2 2
      src/lib/components/chat/Messages.svelte
  24. 7 1
      src/lib/components/chat/Messages/Markdown/MarkdownInlineTokens.svelte
  25. 1 1
      src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte
  26. 2 1
      src/lib/i18n/locales/ar-BH/translation.json
  27. 2 1
      src/lib/i18n/locales/bg-BG/translation.json
  28. 2 1
      src/lib/i18n/locales/bn-BD/translation.json
  29. 8 7
      src/lib/i18n/locales/ca-ES/translation.json
  30. 2 1
      src/lib/i18n/locales/ceb-PH/translation.json
  31. 2 1
      src/lib/i18n/locales/de-DE/translation.json
  32. 2 1
      src/lib/i18n/locales/dg-DG/translation.json
  33. 2 1
      src/lib/i18n/locales/en-GB/translation.json
  34. 2 1
      src/lib/i18n/locales/en-US/translation.json
  35. 2 1
      src/lib/i18n/locales/es-ES/translation.json
  36. 2 1
      src/lib/i18n/locales/fa-IR/translation.json
  37. 2 1
      src/lib/i18n/locales/fi-FI/translation.json
  38. 2 1
      src/lib/i18n/locales/fr-CA/translation.json
  39. 2 1
      src/lib/i18n/locales/fr-FR/translation.json
  40. 2 1
      src/lib/i18n/locales/he-IL/translation.json
  41. 2 1
      src/lib/i18n/locales/hi-IN/translation.json
  42. 2 1
      src/lib/i18n/locales/hr-HR/translation.json
  43. 2 1
      src/lib/i18n/locales/id-ID/translation.json
  44. 2 1
      src/lib/i18n/locales/it-IT/translation.json
  45. 2 1
      src/lib/i18n/locales/ja-JP/translation.json
  46. 2 1
      src/lib/i18n/locales/ka-GE/translation.json
  47. 2 1
      src/lib/i18n/locales/ko-KR/translation.json
  48. 2 1
      src/lib/i18n/locales/lt-LT/translation.json
  49. 2 1
      src/lib/i18n/locales/ms-MY/translation.json
  50. 2 1
      src/lib/i18n/locales/nb-NO/translation.json
  51. 2 1
      src/lib/i18n/locales/nl-NL/translation.json
  52. 2 1
      src/lib/i18n/locales/pa-IN/translation.json
  53. 2 1
      src/lib/i18n/locales/pl-PL/translation.json
  54. 2 1
      src/lib/i18n/locales/pt-BR/translation.json
  55. 2 1
      src/lib/i18n/locales/pt-PT/translation.json
  56. 2 1
      src/lib/i18n/locales/ro-RO/translation.json
  57. 2 1
      src/lib/i18n/locales/ru-RU/translation.json
  58. 2 1
      src/lib/i18n/locales/sr-RS/translation.json
  59. 2 1
      src/lib/i18n/locales/sv-SE/translation.json
  60. 2 1
      src/lib/i18n/locales/th-TH/translation.json
  61. 2 1
      src/lib/i18n/locales/tk-TW/translation.json
  62. 2 1
      src/lib/i18n/locales/tr-TR/translation.json
  63. 2 1
      src/lib/i18n/locales/uk-UA/translation.json
  64. 2 1
      src/lib/i18n/locales/vi-VN/translation.json
  65. 2 1
      src/lib/i18n/locales/zh-CN/translation.json
  66. 2 1
      src/lib/i18n/locales/zh-TW/translation.json

+ 21 - 0
CHANGELOG.md

@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.3.20] - 2024-09-07
+
+### Added
+
+- **🌐 Translation Update**: Updated Catalan translations to improve user experience for Catalan speakers.
+
+### Fixed
+
+- **📄 PDF Download**: Resolved a configuration issue with fonts directory, ensuring PDFs are now downloaded with the correct formatting.
+- **🛠️ Installation of Tools & Functions Requirements**: Fixed a bug where necessary requirements for tools and functions were not properly installing.
+- **🔗 Inline Image Link Rendering**: Enabled rendering of images directly from links in chat.
+- **📞 Post-Call User Interface Cleanup**: Adjusted UI behavior to automatically close chat controls after a voice call ends, reducing screen clutter.
+- **🎙️ Microphone Deactivation Post-Call**: Addressed an issue where the microphone remained active after calls.
+- **✍️ Markdown Spacing Correction**: Corrected spacing in Markdown rendering, ensuring text appears neatly and as expected.
+- **🔄 Message Re-rendering**: Fixed an issue causing all response messages to re-render with each new message, now improving chat performance.
+
+### Changed
+
+- **🌐 Refined Web Search Integration**: Deprecated the Search Query Generation Prompt threshold; introduced a toggle button for "Enable Web Search Query Generation" allowing users to opt-in to using web search more judiciously.
+- **📝 Default Prompt Templates Update**: Emptied environment variable templates for search and title generation now default to the Open WebUI default prompt templates, simplifying configuration efforts.
+
 ## [0.3.19] - 2024-09-05
 
 ### Added

+ 1 - 5
backend/.gitignore

@@ -8,9 +8,5 @@ _test
 Pipfile
 !/data
 /data/*
-!/data/litellm
-/data/litellm/*
-!data/litellm/config.yaml
-
-!data/config.json
+/open_webui/data/*
 .webui_secret_key

+ 2 - 0
backend/open_webui/__init__.py

@@ -10,6 +10,8 @@ app = typer.Typer()
 
 KEY_FILE = Path.cwd() / ".webui_secret_key"
 
+os.environ["FROM_INIT_PY"] = "true"
+
 
 @app.command()
 def serve(

+ 5 - 1
backend/open_webui/apps/ollama/main.py

@@ -28,11 +28,15 @@ from fastapi.middleware.cors import CORSMiddleware
 from fastapi.responses import StreamingResponse
 from pydantic import BaseModel, ConfigDict
 from starlette.background import BackgroundTask
+
+
 from open_webui.utils.misc import (
+    calculate_sha256,
+)
+from open_webui.utils.payload import (
     apply_model_params_to_body_ollama,
     apply_model_params_to_body_openai,
     apply_model_system_prompt_to_body,
-    calculate_sha256,
 )
 from open_webui.utils.utils import get_admin_user, get_verified_user
 

+ 4 - 1
backend/open_webui/apps/openai/main.py

@@ -26,10 +26,13 @@ from fastapi.middleware.cors import CORSMiddleware
 from fastapi.responses import FileResponse, StreamingResponse
 from pydantic import BaseModel
 from starlette.background import BackgroundTask
-from open_webui.utils.misc import (
+
+
+from open_webui.utils.payload import (
     apply_model_params_to_body_openai,
     apply_model_system_prompt_to_body,
 )
+
 from open_webui.utils.utils import get_admin_user, get_verified_user
 
 log = logging.getLogger(__name__)

+ 6 - 2
backend/open_webui/apps/webui/main.py

@@ -51,11 +51,15 @@ from fastapi.middleware.cors import CORSMiddleware
 from fastapi.responses import StreamingResponse
 from pydantic import BaseModel
 from open_webui.utils.misc import (
-    apply_model_params_to_body_openai,
-    apply_model_system_prompt_to_body,
     openai_chat_chunk_message_template,
     openai_chat_completion_message_template,
 )
+from open_webui.utils.payload import (
+    apply_model_params_to_body_openai,
+    apply_model_system_prompt_to_body,
+)
+
+
 from open_webui.utils.tools import get_tools
 
 app = FastAPI()

+ 3 - 5
backend/open_webui/apps/webui/routers/utils.py

@@ -4,6 +4,7 @@ from pathlib import Path
 import black
 import markdown
 from open_webui.config import DATA_DIR, ENABLE_ADMIN_EXPORT
+from open_webui.env import FONTS_DIR
 from open_webui.constants import ERROR_MESSAGES
 from fastapi import APIRouter, Depends, HTTPException, Response, status
 from fpdf import FPDF
@@ -57,14 +58,11 @@ class ChatForm(BaseModel):
 async def download_chat_as_pdf(
     form_data: ChatForm,
 ):
+    global FONTS_DIR
+
     pdf = FPDF()
     pdf.add_page()
 
-    # When running in docker, workdir is /app/backend, so fonts is in /app/backend/static/fonts
-    FONTS_DIR = Path("./static/fonts")
-
-    # Non Docker Installation
-
     # When running using `pip install` the static directory is in the site packages.
     if not FONTS_DIR.exists():
         FONTS_DIR = Path(site.getsitepackages()[0]) / "static/fonts"

+ 11 - 18
backend/open_webui/apps/webui/utils.py

@@ -65,6 +65,7 @@ def replace_imports(content):
 
 
 def load_toolkit_module_by_id(toolkit_id, content=None):
+
     if content is None:
         tool = Tools.get_tool_by_id(toolkit_id)
         if not tool:
@@ -74,6 +75,10 @@ def load_toolkit_module_by_id(toolkit_id, content=None):
 
         content = replace_imports(content)
         Tools.update_tool_by_id(toolkit_id, {"content": content})
+    else:
+        frontmatter = extract_frontmatter(content)
+        # Install required packages found within the frontmatter
+        install_frontmatter_requirements(frontmatter.get("requirements", ""))
 
     module_name = f"tool_{toolkit_id}"
     module = types.ModuleType(module_name)
@@ -82,16 +87,9 @@ def load_toolkit_module_by_id(toolkit_id, content=None):
     try:
         # Executing the modified content in the created module's namespace
         exec(content, module.__dict__)
-
-        # Extract frontmatter, assuming content can be treated directly as a string
-        frontmatter = extract_frontmatter(
-            content
-        )  # Ensure this method is adaptable to handle content strings
-
-        # Install required packages found within the frontmatter
-        install_frontmatter_requirements(frontmatter.get("requirements", ""))
-
+        frontmatter = extract_frontmatter(content)
         print(f"Loaded module: {module.__name__}")
+
         # Create and return the object if the class 'Tools' is found in the module
         if hasattr(module, "Tools"):
             return module.Tools(), frontmatter
@@ -112,6 +110,9 @@ def load_function_module_by_id(function_id, content=None):
 
         content = replace_imports(content)
         Functions.update_function_by_id(function_id, {"content": content})
+    else:
+        frontmatter = extract_frontmatter(content)
+        install_frontmatter_requirements(frontmatter.get("requirements", ""))
 
     module_name = f"function_{function_id}"
     module = types.ModuleType(module_name)
@@ -120,15 +121,7 @@ def load_function_module_by_id(function_id, content=None):
     try:
         # Execute the modified content in the created module's namespace
         exec(content, module.__dict__)
-
-        # Extract the frontmatter from the content, simulate file-like behaviour
-        frontmatter = extract_frontmatter(
-            content
-        )  # This function needs to handle string inputs
-
-        # Install necessary requirements specified in frontmatter
-        install_frontmatter_requirements(frontmatter.get("requirements", ""))
-
+        frontmatter = extract_frontmatter(content)
         print(f"Loaded module: {module.__name__}")
 
         # Create appropriate object based on available class type in the module

+ 9 - 35
backend/open_webui/config.py

@@ -898,53 +898,27 @@ TASK_MODEL_EXTERNAL = PersistentConfig(
 TITLE_GENERATION_PROMPT_TEMPLATE = PersistentConfig(
     "TITLE_GENERATION_PROMPT_TEMPLATE",
     "task.title.prompt_template",
-    os.environ.get(
-        "TITLE_GENERATION_PROMPT_TEMPLATE",
-        """Create a concise, 3-5 word title with an emoji as a title for the prompt in the given language. Suitable Emojis for the summary can be used to enhance understanding but avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT.
-
-Examples of titles:
-📉 Stock Market Trends
-🍪 Perfect Chocolate Chip Recipe
-Evolution of Music Streaming
-Remote Work Productivity Tips
-Artificial Intelligence in Healthcare
-🎮 Video Game Development Insights
-
-Prompt: {{prompt:middletruncate:8000}}""",
-    ),
+    os.environ.get("TITLE_GENERATION_PROMPT_TEMPLATE", ""),
+)
+
+ENABLE_SEARCH_QUERY = PersistentConfig(
+    "ENABLE_SEARCH_QUERY",
+    "task.search.enable",
+    os.environ.get("ENABLE_SEARCH_QUERY", "True").lower() == "true",
 )
 
 
 SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE = PersistentConfig(
     "SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE",
     "task.search.prompt_template",
-    os.environ.get(
-        "SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE",
-        """You are tasked with generating web search queries. Give me an appropriate query to answer my question for google search. Answer with only the query. Today is {{CURRENT_DATE}}.
-        
-Question:
-{{prompt:end:4000}}""",
-    ),
+    os.environ.get("SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE", ""),
 )
 
-SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD = PersistentConfig(
-    "SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD",
-    "task.search.prompt_length_threshold",
-    int(
-        os.environ.get(
-            "SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD",
-            100,
-        )
-    ),
-)
 
 TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE = PersistentConfig(
     "TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE",
     "task.tools.prompt_template",
-    os.environ.get(
-        "TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE",
-        """Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. If a function tool matches, construct and return a JSON object in the format {\"name\": \"functionName\", \"parameters\": {\"requiredFunctionParamKey\": \"requiredFunctionParamValue\"}} using the appropriate tool and its parameters. Only return the object and limit the response to the JSON object without additional text.""",
-    ),
+    os.environ.get("TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE", ""),
 )
 
 

+ 6 - 16
backend/open_webui/env.py

@@ -88,21 +88,9 @@ WEBUI_FAVICON_URL = "https://openwebui.com/favicon.png"
 
 ENV = os.environ.get("ENV", "dev")
 
-PIP_INSTALL = False
-try:
-    importlib.metadata.version("open-webui")
-    PIP_INSTALL = True
-except importlib.metadata.PackageNotFoundError:
-    pass
-
+FROM_INIT_PY = os.environ.get("FROM_INIT_PY", "False").lower() == "true"
 
-PIP_INSTALL = (
-    os.environ.get("PIP_INSTALL", "False").lower() == "true"
-    if os.environ.get("PIP_INSTALL")
-    else PIP_INSTALL
-)
-
-if PIP_INSTALL:
+if FROM_INIT_PY:
     PACKAGE_DATA = {"version": importlib.metadata.version("open-webui")}
 else:
     try:
@@ -193,7 +181,7 @@ WEBUI_BUILD_HASH = os.environ.get("WEBUI_BUILD_HASH", "dev-build")
 
 DATA_DIR = Path(os.getenv("DATA_DIR", BACKEND_DIR / "data")).resolve()
 
-if PIP_INSTALL:
+if FROM_INIT_PY:
     NEW_DATA_DIR = Path(os.getenv("DATA_DIR", OPEN_WEBUI_DIR / "data")).resolve()
     NEW_DATA_DIR.mkdir(parents=True, exist_ok=True)
 
@@ -210,9 +198,11 @@ if PIP_INSTALL:
     DATA_DIR = Path(os.getenv("DATA_DIR", OPEN_WEBUI_DIR / "data"))
 
 
+FONTS_DIR = Path(os.getenv("FONTS_DIR", OPEN_WEBUI_DIR / "static" / "fonts"))
+
 FRONTEND_BUILD_DIR = Path(os.getenv("FRONTEND_BUILD_DIR", BASE_DIR / "build")).resolve()
 
-if PIP_INSTALL:
+if FROM_INIT_PY:
     FRONTEND_BUILD_DIR = Path(
         os.getenv("FRONTEND_BUILD_DIR", OPEN_WEBUI_DIR / "frontend")
     ).resolve()

+ 40 - 17
backend/open_webui/main.py

@@ -63,8 +63,8 @@ from open_webui.config import (
     MODEL_FILTER_LIST,
     OAUTH_MERGE_ACCOUNTS_BY_EMAIL,
     OAUTH_PROVIDERS,
+    ENABLE_SEARCH_QUERY,
     SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE,
-    SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD,
     STATIC_DIR,
     TASK_MODEL,
     TASK_MODEL_EXTERNAL,
@@ -199,9 +199,7 @@ app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE = TITLE_GENERATION_PROMPT_TEMP
 app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE = (
     SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
 )
-app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD = (
-    SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD
-)
+app.state.config.ENABLE_SEARCH_QUERY = ENABLE_SEARCH_QUERY
 app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE = (
     TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
 )
@@ -397,8 +395,13 @@ async def chat_completion_tools_handler(
     specs = [tool["spec"] for tool in tools.values()]
     tools_specs = json.dumps(specs)
 
+    if app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE != "":
+        template = app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
+    else:
+        template = """Available Tools: {{TOOLS}}\nReturn an empty string if no tools match the query. If a function tool matches, construct and return a JSON object in the format {\"name\": \"functionName\", \"parameters\": {\"requiredFunctionParamKey\": \"requiredFunctionParamValue\"}} using the appropriate tool and its parameters. Only return the object and limit the response to the JSON object without additional text."""
+
     tools_function_calling_prompt = tools_function_calling_generation_template(
-        app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE, tools_specs
+        template, tools_specs
     )
     log.info(f"{tools_function_calling_prompt=}")
     payload = get_tools_function_calling_payload(
@@ -1312,8 +1315,8 @@ async def get_task_config(user=Depends(get_verified_user)):
         "TASK_MODEL": app.state.config.TASK_MODEL,
         "TASK_MODEL_EXTERNAL": app.state.config.TASK_MODEL_EXTERNAL,
         "TITLE_GENERATION_PROMPT_TEMPLATE": app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE,
+        "ENABLE_SEARCH_QUERY": app.state.config.ENABLE_SEARCH_QUERY,
         "SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE": app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE,
-        "SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD": app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD,
         "TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE": app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE,
     }
 
@@ -1323,7 +1326,7 @@ class TaskConfigForm(BaseModel):
     TASK_MODEL_EXTERNAL: Optional[str]
     TITLE_GENERATION_PROMPT_TEMPLATE: str
     SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE: str
-    SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD: int
+    ENABLE_SEARCH_QUERY: bool
     TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE: str
 
 
@@ -1337,9 +1340,7 @@ async def update_task_config(form_data: TaskConfigForm, user=Depends(get_admin_u
     app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE = (
         form_data.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
     )
-    app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD = (
-        form_data.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD
-    )
+    app.state.config.ENABLE_SEARCH_QUERY = form_data.ENABLE_SEARCH_QUERY
     app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE = (
         form_data.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
     )
@@ -1349,7 +1350,7 @@ async def update_task_config(form_data: TaskConfigForm, user=Depends(get_admin_u
         "TASK_MODEL_EXTERNAL": app.state.config.TASK_MODEL_EXTERNAL,
         "TITLE_GENERATION_PROMPT_TEMPLATE": app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE,
         "SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE": app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE,
-        "SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD": app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD,
+        "ENABLE_SEARCH_QUERY": app.state.config.ENABLE_SEARCH_QUERY,
         "TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE": app.state.config.TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE,
     }
 
@@ -1371,7 +1372,20 @@ async def generate_title(form_data: dict, user=Depends(get_verified_user)):
 
     print(model_id)
 
-    template = app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE
+    if app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE != "":
+        template = app.state.config.TITLE_GENERATION_PROMPT_TEMPLATE
+    else:
+        template = """Create a concise, 3-5 word title with an emoji as a title for the prompt in the given language. Suitable Emojis for the summary can be used to enhance understanding but avoid quotation marks or special formatting. RESPOND ONLY WITH THE TITLE TEXT.
+
+Examples of titles:
+📉 Stock Market Trends
+🍪 Perfect Chocolate Chip Recipe
+Evolution of Music Streaming
+Remote Work Productivity Tips
+Artificial Intelligence in Healthcare
+🎮 Video Game Development Insights
+
+Prompt: {{prompt:middletruncate:8000}}"""
 
     content = title_generation_template(
         template,
@@ -1416,11 +1430,10 @@ async def generate_title(form_data: dict, user=Depends(get_verified_user)):
 @app.post("/api/task/query/completions")
 async def generate_search_query(form_data: dict, user=Depends(get_verified_user)):
     print("generate_search_query")
-
-    if len(form_data["prompt"]) < app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD:
+    if not app.state.config.ENABLE_SEARCH_QUERY:
         raise HTTPException(
             status_code=status.HTTP_400_BAD_REQUEST,
-            detail=f"Skip search query generation for short prompts (< {app.state.config.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD} characters)",
+            detail=f"Search query generation is disabled",
         )
 
     model_id = form_data["model"]
@@ -1436,12 +1449,22 @@ async def generate_search_query(form_data: dict, user=Depends(get_verified_user)
 
     print(model_id)
 
-    template = app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
+    if app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE != "":
+        template = app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
+    else:
+        template = """You are tasked with assessing the need for a web search based on the current question and the context provided by the previous interactions. If the question requires a web search, generate an appropriate query for a Google search and respond with only the query. If the question can be answered without a web search or does not require further information, return an empty string. Today's date is {{CURRENT_DATE}}.
+
+Interaction History:
+{{MESSAGES:END:6}}
+Current Question:
+{{prompt:end:4000}}"""
 
     content = search_query_generation_template(
-        template, form_data["prompt"], {"name": user.name}
+        template, form_data["messages"], {"name": user.name}
     )
 
+    print("content", content)
+
     payload = {
         "model": model_id,
         "messages": [{"role": "user", "content": content}],

+ 19 - 0
backend/open_webui/migrations/scripts/revision.py

@@ -0,0 +1,19 @@
+from alembic import command
+from alembic.config import Config
+
+from open_webui.env import OPEN_WEBUI_DIR
+
+alembic_cfg = Config(OPEN_WEBUI_DIR / "alembic.ini")
+
+# Set the script location dynamically
+migrations_path = OPEN_WEBUI_DIR / "migrations"
+alembic_cfg.set_main_option("script_location", str(migrations_path))
+
+
+def revision(message: str) -> None:
+    command.revision(alembic_cfg, message=message, autogenerate=False)
+
+
+if __name__ == "__main__":
+    input_message = input("Enter the revision message: ")
+    revision(input_message)

+ 11 - 31
backend/open_webui/migrations/versions/7e5b5dc7342b_init.py

@@ -11,8 +11,8 @@ from typing import Sequence, Union
 import sqlalchemy as sa
 from alembic import op
 
-
 import open_webui.apps.webui.internal.db
+from open_webui.apps.webui.internal.db import JSONField
 from open_webui.migrations.util import get_existing_tables
 
 # revision identifiers, used by Alembic.
@@ -82,9 +82,7 @@ def upgrade() -> None:
             sa.Column("id", sa.String(), nullable=False),
             sa.Column("user_id", sa.String(), nullable=True),
             sa.Column("filename", sa.Text(), nullable=True),
-            sa.Column(
-                "meta", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
+            sa.Column("meta", JSONField(), nullable=True),
             sa.Column("created_at", sa.BigInteger(), nullable=True),
             sa.PrimaryKeyConstraint("id"),
         )
@@ -97,12 +95,8 @@ def upgrade() -> None:
             sa.Column("name", sa.Text(), nullable=True),
             sa.Column("type", sa.Text(), nullable=True),
             sa.Column("content", sa.Text(), nullable=True),
-            sa.Column(
-                "meta", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
-            sa.Column(
-                "valves", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
+            sa.Column("meta", JSONField(), nullable=True),
+            sa.Column("valves", JSONField(), nullable=True),
             sa.Column("is_active", sa.Boolean(), nullable=True),
             sa.Column("is_global", sa.Boolean(), nullable=True),
             sa.Column("updated_at", sa.BigInteger(), nullable=True),
@@ -128,12 +122,8 @@ def upgrade() -> None:
             sa.Column("user_id", sa.Text(), nullable=True),
             sa.Column("base_model_id", sa.Text(), nullable=True),
             sa.Column("name", sa.Text(), nullable=True),
-            sa.Column(
-                "params", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
-            sa.Column(
-                "meta", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
+            sa.Column("params", JSONField(), nullable=True),
+            sa.Column("meta", JSONField(), nullable=True),
             sa.Column("updated_at", sa.BigInteger(), nullable=True),
             sa.Column("created_at", sa.BigInteger(), nullable=True),
             sa.PrimaryKeyConstraint("id"),
@@ -167,15 +157,9 @@ def upgrade() -> None:
             sa.Column("user_id", sa.String(), nullable=True),
             sa.Column("name", sa.Text(), nullable=True),
             sa.Column("content", sa.Text(), nullable=True),
-            sa.Column(
-                "specs", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
-            sa.Column(
-                "meta", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
-            sa.Column(
-                "valves", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
+            sa.Column("specs", JSONField(), nullable=True),
+            sa.Column("meta", JSONField(), nullable=True),
+            sa.Column("valves", JSONField(), nullable=True),
             sa.Column("updated_at", sa.BigInteger(), nullable=True),
             sa.Column("created_at", sa.BigInteger(), nullable=True),
             sa.PrimaryKeyConstraint("id"),
@@ -193,12 +177,8 @@ def upgrade() -> None:
             sa.Column("updated_at", sa.BigInteger(), nullable=True),
             sa.Column("created_at", sa.BigInteger(), nullable=True),
             sa.Column("api_key", sa.String(), nullable=True),
-            sa.Column(
-                "settings", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
-            sa.Column(
-                "info", open_webui.apps.webui.internal.db.JSONField(), nullable=True
-            ),
+            sa.Column("settings", JSONField(), nullable=True),
+            sa.Column("info", JSONField(), nullable=True),
             sa.Column("oauth_sub", sa.Text(), nullable=True),
             sa.PrimaryKeyConstraint("id"),
             sa.UniqueConstraint("api_key"),

+ 8 - 84
backend/open_webui/utils/misc.py

@@ -6,7 +6,14 @@ from datetime import timedelta
 from pathlib import Path
 from typing import Callable, Optional
 
-from open_webui.utils.task import prompt_template
+
+def get_messages_content(messages: list[dict]) -> str:
+    return "\n".join(
+        [
+            f"{message['role'].upper()}: {get_content_from_message(message)}"
+            for message in messages
+        ]
+    )
 
 
 def get_last_user_message_item(messages: list[dict]) -> Optional[dict]:
@@ -30,7 +37,6 @@ def get_last_user_message(messages: list[dict]) -> Optional[str]:
     message = get_last_user_message_item(messages)
     if message is None:
         return None
-
     return get_content_from_message(message)
 
 
@@ -114,88 +120,6 @@ def openai_chat_completion_message_template(model: str, message: str) -> dict:
     return template
 
 
-# inplace function: form_data is modified
-def apply_model_system_prompt_to_body(params: dict, form_data: dict, user) -> dict:
-    system = params.get("system", None)
-    if not system:
-        return form_data
-
-    if user:
-        template_params = {
-            "user_name": user.name,
-            "user_location": user.info.get("location") if user.info else None,
-        }
-    else:
-        template_params = {}
-    system = prompt_template(system, **template_params)
-    form_data["messages"] = add_or_update_system_message(
-        system, form_data.get("messages", [])
-    )
-    return form_data
-
-
-# inplace function: form_data is modified
-def apply_model_params_to_body(
-    params: dict, form_data: dict, mappings: dict[str, Callable]
-) -> dict:
-    if not params:
-        return form_data
-
-    for key, cast_func in mappings.items():
-        if (value := params.get(key)) is not None:
-            form_data[key] = cast_func(value)
-
-    return form_data
-
-
-# inplace function: form_data is modified
-def apply_model_params_to_body_openai(params: dict, form_data: dict) -> dict:
-    mappings = {
-        "temperature": float,
-        "top_p": int,
-        "max_tokens": int,
-        "frequency_penalty": int,
-        "seed": lambda x: x,
-        "stop": lambda x: [bytes(s, "utf-8").decode("unicode_escape") for s in x],
-    }
-    return apply_model_params_to_body(params, form_data, mappings)
-
-
-def apply_model_params_to_body_ollama(params: dict, form_data: dict) -> dict:
-    opts = [
-        "temperature",
-        "top_p",
-        "seed",
-        "mirostat",
-        "mirostat_eta",
-        "mirostat_tau",
-        "num_ctx",
-        "num_batch",
-        "num_keep",
-        "repeat_last_n",
-        "tfs_z",
-        "top_k",
-        "min_p",
-        "use_mmap",
-        "use_mlock",
-        "num_thread",
-        "num_gpu",
-    ]
-    mappings = {i: lambda x: x for i in opts}
-    form_data = apply_model_params_to_body(params, form_data, mappings)
-
-    name_differences = {
-        "max_tokens": "num_predict",
-        "frequency_penalty": "repeat_penalty",
-    }
-
-    for key, value in name_differences.items():
-        if (param := params.get(key, None)) is not None:
-            form_data[value] = param
-
-    return form_data
-
-
 def get_gravatar_url(email):
     # Trim leading and trailing whitespace from
     # an email address and force all characters

+ 88 - 0
backend/open_webui/utils/payload.py

@@ -0,0 +1,88 @@
+from open_webui.utils.task import prompt_template
+from open_webui.utils.misc import (
+    add_or_update_system_message,
+)
+
+from typing import Callable, Optional
+
+
+# inplace function: form_data is modified
+def apply_model_system_prompt_to_body(params: dict, form_data: dict, user) -> dict:
+    system = params.get("system", None)
+    if not system:
+        return form_data
+
+    if user:
+        template_params = {
+            "user_name": user.name,
+            "user_location": user.info.get("location") if user.info else None,
+        }
+    else:
+        template_params = {}
+    system = prompt_template(system, **template_params)
+    form_data["messages"] = add_or_update_system_message(
+        system, form_data.get("messages", [])
+    )
+    return form_data
+
+
+# inplace function: form_data is modified
+def apply_model_params_to_body(
+    params: dict, form_data: dict, mappings: dict[str, Callable]
+) -> dict:
+    if not params:
+        return form_data
+
+    for key, cast_func in mappings.items():
+        if (value := params.get(key)) is not None:
+            form_data[key] = cast_func(value)
+
+    return form_data
+
+
+# inplace function: form_data is modified
+def apply_model_params_to_body_openai(params: dict, form_data: dict) -> dict:
+    mappings = {
+        "temperature": float,
+        "top_p": int,
+        "max_tokens": int,
+        "frequency_penalty": int,
+        "seed": lambda x: x,
+        "stop": lambda x: [bytes(s, "utf-8").decode("unicode_escape") for s in x],
+    }
+    return apply_model_params_to_body(params, form_data, mappings)
+
+
+def apply_model_params_to_body_ollama(params: dict, form_data: dict) -> dict:
+    opts = [
+        "temperature",
+        "top_p",
+        "seed",
+        "mirostat",
+        "mirostat_eta",
+        "mirostat_tau",
+        "num_ctx",
+        "num_batch",
+        "num_keep",
+        "repeat_last_n",
+        "tfs_z",
+        "top_k",
+        "min_p",
+        "use_mmap",
+        "use_mlock",
+        "num_thread",
+        "num_gpu",
+    ]
+    mappings = {i: lambda x: x for i in opts}
+    form_data = apply_model_params_to_body(params, form_data, mappings)
+
+    name_differences = {
+        "max_tokens": "num_predict",
+        "frequency_penalty": "repeat_penalty",
+    }
+
+    for key, value in name_differences.items():
+        if (param := params.get(key, None)) is not None:
+            form_data[value] = param
+
+    return form_data

+ 38 - 17
backend/open_webui/utils/task.py

@@ -4,6 +4,9 @@ from datetime import datetime
 from typing import Optional
 
 
+from open_webui.utils.misc import get_last_user_message, get_messages_content
+
+
 def prompt_template(
     template: str, user_name: Optional[str] = None, user_location: Optional[str] = None
 ) -> str:
@@ -37,9 +40,7 @@ def prompt_template(
     return template
 
 
-def title_generation_template(
-    template: str, prompt: str, user: Optional[dict] = None
-) -> str:
+def replace_prompt_variable(template: str, prompt: str) -> str:
     def replacement_function(match):
         full_match = match.group(0)
         start_length = match.group(1)
@@ -66,7 +67,13 @@ def title_generation_template(
         replacement_function,
         template,
     )
+    return template
 
+
+def title_generation_template(
+    template: str, prompt: str, user: Optional[dict] = None
+) -> str:
+    template = replace_prompt_variable(template, prompt)
     template = prompt_template(
         template,
         **(
@@ -79,36 +86,50 @@ def title_generation_template(
     return template
 
 
-def search_query_generation_template(
-    template: str, prompt: str, user: Optional[dict] = None
-) -> str:
+def replace_messages_variable(template: str, messages: list[str]) -> str:
     def replacement_function(match):
         full_match = match.group(0)
         start_length = match.group(1)
         end_length = match.group(2)
         middle_length = match.group(3)
 
-        if full_match == "{{prompt}}":
-            return prompt
+        # Process messages based on the number of messages required
+        if full_match == "{{MESSAGES}}":
+            return get_messages_content(messages)
         elif start_length is not None:
-            return prompt[: int(start_length)]
+            return get_messages_content(messages[: int(start_length)])
         elif end_length is not None:
-            return prompt[-int(end_length) :]
+            return get_messages_content(messages[-int(end_length) :])
         elif middle_length is not None:
-            middle_length = int(middle_length)
-            if len(prompt) <= middle_length:
-                return prompt
-            start = prompt[: math.ceil(middle_length / 2)]
-            end = prompt[-math.floor(middle_length / 2) :]
-            return f"{start}...{end}"
+            mid = int(middle_length)
+
+            if len(messages) <= mid:
+                return get_messages_content(messages)
+            # Handle middle truncation: split to get start and end portions of the messages list
+            half = mid // 2
+            start_msgs = messages[:half]
+            end_msgs = messages[-half:] if mid % 2 == 0 else messages[-(half + 1) :]
+            formatted_start = get_messages_content(start_msgs)
+            formatted_end = get_messages_content(end_msgs)
+            return f"{formatted_start}\n{formatted_end}"
         return ""
 
     template = re.sub(
-        r"{{prompt}}|{{prompt:start:(\d+)}}|{{prompt:end:(\d+)}}|{{prompt:middletruncate:(\d+)}}",
+        r"{{MESSAGES}}|{{MESSAGES:START:(\d+)}}|{{MESSAGES:END:(\d+)}}|{{MESSAGES:MIDDLETRUNCATE:(\d+)}}",
         replacement_function,
         template,
     )
 
+    return template
+
+
+def search_query_generation_template(
+    template: str, messages: list[dict], user: Optional[dict] = None
+) -> str:
+    prompt = get_last_user_message(messages)
+    template = replace_prompt_variable(template, prompt)
+    template = replace_messages_variable(template, messages)
+
     template = prompt_template(
         template,
         **(

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
 	"name": "open-webui",
-	"version": "0.3.19",
+	"version": "0.3.20",
 	"lockfileVersion": 3,
 	"requires": true,
 	"packages": {
 		"": {
 			"name": "open-webui",
-			"version": "0.3.19",
+			"version": "0.3.20",
 			"dependencies": {
 				"@codemirror/lang-javascript": "^6.2.2",
 				"@codemirror/lang-python": "^6.1.6",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "open-webui",
-	"version": "0.3.19",
+	"version": "0.3.20",
 	"private": true,
 	"scripts": {
 		"dev": "npm run pyodide:fetch && vite dev --host",

+ 41 - 25
src/lib/components/admin/Settings/Interface.svelte

@@ -23,8 +23,8 @@
 		TASK_MODEL: '',
 		TASK_MODEL_EXTERNAL: '',
 		TITLE_GENERATION_PROMPT_TEMPLATE: '',
-		SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE: '',
-		SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD: 0
+		ENABLE_SEARCH_QUERY: true,
+		SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE: ''
 	};
 
 	let promptSuggestions = [];
@@ -43,7 +43,6 @@
 		taskConfig = await getTaskConfig(localStorage.token);
 
 		promptSuggestions = $config?.default_prompt_suggestions;
-
 		banners = await getBanners(localStorage.token);
 	});
 
@@ -119,33 +118,50 @@
 			</div>
 
 			<div class="mt-3">
-				<div class=" mb-2.5 text-sm font-medium">{$i18n.t('Title Generation Prompt')}</div>
-				<textarea
-					bind:value={taskConfig.TITLE_GENERATION_PROMPT_TEMPLATE}
-					class="w-full rounded-lg py-3 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none"
-					rows="6"
-				/>
-			</div>
+				<div class=" mb-2.5 text-xs font-medium">{$i18n.t('Title Generation Prompt')}</div>
 
-			<div class="mt-3">
-				<div class=" mb-2.5 text-sm font-medium">{$i18n.t('Search Query Generation Prompt')}</div>
-				<textarea
-					bind:value={taskConfig.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE}
-					class="w-full rounded-lg py-3 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none"
-					rows="6"
-				/>
+				<Tooltip
+					content={$i18n.t('Leave empty to use the default prompt, or enter a custom prompt')}
+					placement="top-start"
+				>
+					<textarea
+						bind:value={taskConfig.TITLE_GENERATION_PROMPT_TEMPLATE}
+						class="w-full rounded-lg py-3 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none"
+						rows="3"
+						placeholder={$i18n.t('Leave empty to use the default prompt, or enter a custom prompt')}
+					/>
+				</Tooltip>
 			</div>
 
-			<div class="mt-3">
-				<div class=" mb-2.5 text-sm font-medium">
-					{$i18n.t('Search Query Generation Prompt Length Threshold')}
+			<hr class=" dark:border-gray-850 my-3" />
+
+			<div class="my-3 flex w-full items-center justify-between">
+				<div class=" self-center text-xs font-medium">
+					{$i18n.t('Enable Web Search Query Generation')}
 				</div>
-				<input
-					bind:value={taskConfig.SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD}
-					class="w-full rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none"
-					type="number"
-				/>
+
+				<Switch bind:state={taskConfig.ENABLE_SEARCH_QUERY} />
 			</div>
+
+			{#if taskConfig.ENABLE_SEARCH_QUERY}
+				<div class="">
+					<div class=" mb-2.5 text-xs font-medium">{$i18n.t('Search Query Generation Prompt')}</div>
+
+					<Tooltip
+						content={$i18n.t('Leave empty to use the default prompt, or enter a custom prompt')}
+						placement="top-start"
+					>
+						<textarea
+							bind:value={taskConfig.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE}
+							class="w-full rounded-lg py-3 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none resize-none"
+							rows="3"
+							placeholder={$i18n.t(
+								'Leave empty to use the default prompt, or enter a custom prompt'
+							)}
+						/>
+					</Tooltip>
+				</div>
+			{/if}
 		</div>
 
 		<hr class=" dark:border-gray-850 my-3" />

+ 14 - 10
src/lib/components/chat/Chat.svelte

@@ -732,6 +732,8 @@
 					responseMessage.userContext = userContext;
 
 					const chatEventEmitter = await getChatEventEmitter(model.id, _chatId);
+
+					scrollToBottom();
 					if (webSearchEnabled) {
 						await getWebSearchResults(model.id, parentId, responseMessageId);
 					}
@@ -1512,23 +1514,25 @@
 		messages = messages;
 
 		const prompt = userMessage.content;
-		let searchQuery = await generateSearchQuery(localStorage.token, model, messages, prompt).catch(
-			(error) => {
-				console.log(error);
-				return prompt;
-			}
-		);
+		let searchQuery = await generateSearchQuery(
+			localStorage.token,
+			model,
+			messages.filter((message) => message?.content?.trim()),
+			prompt
+		).catch((error) => {
+			console.log(error);
+			return prompt;
+		});
 
-		if (!searchQuery) {
-			toast.warning($i18n.t('No search query generated'));
+		if (!searchQuery || searchQuery == '') {
 			responseMessage.statusHistory.push({
 				done: true,
 				error: true,
 				action: 'web_search',
-				description: 'No search query generated'
+				description: $i18n.t('No search query generated')
 			});
-
 			messages = messages;
+			return;
 		}
 
 		responseMessage.statusHistory.push({

+ 11 - 1
src/lib/components/chat/ChatControls.svelte

@@ -84,7 +84,17 @@
 				class="w-full h-full px-5 py-4 bg-white dark:shadow-lg dark:bg-gray-850 border border-gray-50 dark:border-gray-800 rounded-xl z-50 pointer-events-auto overflow-y-auto scrollbar-hidden"
 			>
 				{#if $showCallOverlay}
-					<CallOverlay bind:files {submitPrompt} {stopResponse} {modelId} {chatId} {eventTarget} />
+					<CallOverlay
+						bind:files
+						{submitPrompt}
+						{stopResponse}
+						{modelId}
+						{chatId}
+						{eventTarget}
+						on:close={() => {
+							show = false;
+						}}
+					/>
 				{:else}
 					<Controls
 						on:close={() => {

+ 2 - 2
src/lib/components/chat/MessageInput/CallOverlay.svelte

@@ -922,8 +922,8 @@
 				<button
 					class=" p-3 rounded-full bg-gray-50 dark:bg-gray-900"
 					on:click={async () => {
-						stopAudioStream();
-						stopVideoStream();
+						await stopAudioStream();
+						await stopVideoStream();
 						showCallOverlay.set(false);
 						dispatch('close');
 					}}

+ 2 - 2
src/lib/components/chat/Messages.svelte

@@ -309,7 +309,7 @@
 	{:else}
 		<div class="w-full pt-2">
 			{#key chatId}
-				{#each messages as message, messageIdx}
+				{#each messages as message, messageIdx (message.id)}
 					<div class=" w-full {messageIdx === messages.length - 1 ? ' pb-12' : ''}">
 						<div
 							class="flex flex-col justify-between px-5 mb-3 {($settings?.widescreenMode ?? null)
@@ -334,7 +334,7 @@
 									copyToClipboard={copyToClipboardWithToast}
 								/>
 							{:else if (history.messages[message.parentId]?.models?.length ?? 1) === 1}
-								{#key message.id && history.currentId}
+								{#key message.id}
 									<ResponseMessage
 										{message}
 										siblings={history.messages[message.parentId]?.childrenIds ?? []}

+ 7 - 1
src/lib/components/chat/Messages/Markdown/MarkdownInlineTokens.svelte

@@ -30,7 +30,13 @@
 			{token.text}
 		{/if}
 	{:else if token.type === 'link'}
-		<a href={token.href} target="_blank" rel="nofollow" title={token.title}>{token.text}</a>
+		{#if token.tokens}
+			<a href={token.href} target="_blank" rel="nofollow" title={token.title}>
+				<svelte:self id={`${id}-a`} tokens={token.tokens} />
+			</a>
+		{:else}
+			<a href={token.href} target="_blank" rel="nofollow" title={token.title}>{token.text}</a>
+		{/if}
 	{:else if token.type === 'image'}
 		<Image src={token.href} alt={token.text} />
 	{:else if token.type === 'strong'}

+ 1 - 1
src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte

@@ -142,7 +142,7 @@
 			/>
 		{/if}
 	{:else if token.type === 'space'}
-		<div class="my-0.5" />
+		<div class="my-2" />
 	{:else}
 		{console.log('Unknown token', token)}
 	{/if}

+ 2 - 1
src/lib/i18n/locales/ar-BH/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "تفعيل عمليات التسجيل الجديدة",
 	"Enable Web Search": "تمكين بحث الويب",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "تأكد من أن ملف CSV الخاص بك يتضمن 4 أعمدة بهذا الترتيب: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "آخر نشاط",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "فاتح",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "يمكن أن تصدر بعض الأخطاء. لذلك يجب التحقق من المعلومات المهمة",
@@ -538,7 +540,6 @@
 	"Search Models": "نماذج البحث",
 	"Search Prompts": "أبحث حث",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "عدد نتائج البحث",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/bg-BG/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Вклюване на Нови Потребители",
 	"Enable Web Search": "Разрешаване на търсене в уеб",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Уверете се, че вашият CSV файл включва 4 колони в следния ред: Име, Имейл, Парола, Роля.",
@@ -367,6 +368,7 @@
 	"Last Active": "Последни активни",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Светъл",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLMs могат да правят грешки. Проверете важните данни.",
@@ -538,7 +540,6 @@
 	"Search Models": "Търсене на модели",
 	"Search Prompts": "Търси Промптове",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Брой резултати от търсенето",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/bn-BD/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "নতুন সাইনআপ চালু করুন",
 	"Enable Web Search": "ওয়েব অনুসন্ধান সক্ষম করুন",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "আপনার সিএসভি ফাইলটিতে এই ক্রমে 4 টি কলাম অন্তর্ভুক্ত রয়েছে তা নিশ্চিত করুন: নাম, ইমেল, পাসওয়ার্ড, ভূমিকা।.",
@@ -367,6 +368,7 @@
 	"Last Active": "সর্বশেষ সক্রিয়",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "লাইট",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLM ভুল করতে পারে। গুরুত্বপূর্ণ তথ্য যাচাই করে নিন।",
@@ -538,7 +540,6 @@
 	"Search Models": "অনুসন্ধান মডেল",
 	"Search Prompts": "প্রম্পটসমূহ অনুসন্ধান করুন",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "অনুসন্ধানের ফলাফল গণনা",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 8 - 7
src/lib/i18n/locales/ca-ES/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "Permetre la qualificació de missatges",
 	"Enable New Sign Ups": "Permetre nous registres",
 	"Enable Web Search": "Activar la cerca web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Habilitat",
 	"Engine": "Motor",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Assegura't que els teus fitxers CSV inclouen 4 columnes en aquest ordre: Nom, Correu electrònic, Contrasenya, Rol.",
@@ -248,8 +249,8 @@
 	"Enter model tag (e.g. {{modelTag}})": "Introdueix l'etiqueta del model (p. ex. {{modelTag}})",
 	"Enter Number of Steps (e.g. 50)": "Introdueix el nombre de passos (p. ex. 50)",
 	"Enter Score": "Introdueix la puntuació",
-	"Enter SearchApi API Key": "",
-	"Enter SearchApi Engine": "",
+	"Enter SearchApi API Key": "Introdueix la clau API SearchApi",
+	"Enter SearchApi Engine": "Introdueix el motor SearchApi",
 	"Enter Searxng Query URL": "Introdueix l'URL de consulta de Searxng",
 	"Enter Serper API Key": "Introdueix la clau API Serper",
 	"Enter Serply API Key": "Introdueix la clau API Serply",
@@ -272,7 +273,7 @@
 	"Export All Chats (All Users)": "Exportar tots els xats (Tots els usuaris)",
 	"Export chat (.json)": "Exportar el xat (.json)",
 	"Export Chats": "Exportar els xats",
-	"Export Config to JSON File": "",
+	"Export Config to JSON File": "Exportar la configuració a un arxiu JSON",
 	"Export Documents Mapping": "Exportar el mapatge de documents",
 	"Export Functions": "Exportar funcions",
 	"Export LiteLLM config.yaml": "Exportar la configuració LiteLLM config.yaml",
@@ -337,7 +338,7 @@
 	"Image Settings": "Preferències d'imatges",
 	"Images": "Imatges",
 	"Import Chats": "Importar xats",
-	"Import Config from JSON File": "",
+	"Import Config from JSON File": "Importar la configuració des d'un arxiu JSON",
 	"Import Documents Mapping": "Importar el mapatge de documents",
 	"Import Functions": "Importar funcions",
 	"Import Models": "Importar models",
@@ -367,6 +368,7 @@
 	"Last Active": "Activitat recent",
 	"Last Modified": "Modificació",
 	"Leave empty for unlimited": "Deixar-ho buit per il·limitat",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Clar",
 	"Listening...": "Escoltant...",
 	"LLMs can make mistakes. Verify important information.": "Els models de llenguatge poden cometre errors. Verifica la informació important.",
@@ -538,11 +540,10 @@
 	"Search Models": "Cercar models",
 	"Search Prompts": "Cercar indicacions",
 	"Search Query Generation Prompt": "Indicació de cerca de generació de consultes",
-	"Search Query Generation Prompt Length Threshold": "Mida màxima de la indicació de cerca de generació de consultes",
 	"Search Result Count": "Recompte de resultats de cerca",
 	"Search Tools": "Cercar eines",
-	"SearchApi API Key": "",
-	"SearchApi Engine": "",
+	"SearchApi API Key": "Clau API de SearchApi",
+	"SearchApi Engine": "Motor de SearchApi",
 	"Searched {{count}} sites_one": "S'ha cercat {{count}} una pàgina",
 	"Searched {{count}} sites_many": "S'han cercat {{count}} pàgines",
 	"Searched {{count}} sites_other": "S'han cercat {{count}} pàgines",

+ 2 - 1
src/lib/i18n/locales/ceb-PH/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "I-enable ang bag-ong mga rehistro",
 	"Enable Web Search": "",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
@@ -367,6 +368,7 @@
 	"Last Active": "",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Kahayag",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "Ang mga LLM mahimong masayop. ",
@@ -538,7 +540,6 @@
 	"Search Models": "",
 	"Search Prompts": "Pangitaa ang mga prompt",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/de-DE/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Registrierung erlauben",
 	"Enable Web Search": "Websuche aktivieren",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "Engine",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Stellen Sie sicher, dass Ihre CSV-Datei 4 Spalten in dieser Reihenfolge enthält: Name, E-Mail, Passwort, Rolle.",
@@ -367,6 +368,7 @@
 	"Last Active": "Zuletzt aktiv",
 	"Last Modified": "Zuletzt bearbeitet",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Hell",
 	"Listening...": "Höre zu...",
 	"LLMs can make mistakes. Verify important information.": "LLMs können Fehler machen. Überprüfe wichtige Informationen.",
@@ -538,7 +540,6 @@
 	"Search Models": "Modelle durchsuchen...",
 	"Search Prompts": "Prompts durchsuchen...",
 	"Search Query Generation Prompt": "Suchanfragengenerierungsvorlage",
-	"Search Query Generation Prompt Length Threshold": "Längenschwelle für Suchanfragengenerierung",
 	"Search Result Count": "Anzahl der Suchergebnisse",
 	"Search Tools": "Werkzeuge durchsuchen...",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/dg-DG/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Enable New Bark Ups",
 	"Enable Web Search": "",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
@@ -367,6 +368,7 @@
 	"Last Active": "",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Light",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLMs can make borks. Verify important info.",
@@ -538,7 +540,6 @@
 	"Search Models": "",
 	"Search Prompts": "Search Prompts much wow",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/en-GB/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "",
 	"Enable Web Search": "",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
@@ -367,6 +368,7 @@
 	"Last Active": "",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "",
@@ -538,7 +540,6 @@
 	"Search Models": "",
 	"Search Prompts": "",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/en-US/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "",
 	"Enable Web Search": "",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
@@ -367,6 +368,7 @@
 	"Last Active": "",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "",
@@ -538,7 +540,6 @@
 	"Search Models": "",
 	"Search Prompts": "",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/es-ES/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Habilitar Nuevos Registros",
 	"Enable Web Search": "Habilitar la búsqueda web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Asegúrese de que su archivo CSV incluya 4 columnas en este orden: Nombre, Correo Electrónico, Contraseña, Rol.",
@@ -367,6 +368,7 @@
 	"Last Active": "Última Actividad",
 	"Last Modified": "Modificado por última vez",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Claro",
 	"Listening...": "Escuchando...",
 	"LLMs can make mistakes. Verify important information.": "Los LLM pueden cometer errores. Verifica la información importante.",
@@ -538,7 +540,6 @@
 	"Search Models": "Modelos de búsqueda",
 	"Search Prompts": "Buscar Prompts",
 	"Search Query Generation Prompt": "Búsqueda de consulta de generación de prompts",
-	"Search Query Generation Prompt Length Threshold": "Nivel de longitud de Búsqueda de consulta de generación de prompts",
 	"Search Result Count": "Recuento de resultados de búsqueda",
 	"Search Tools": "Búsqueda de herramientas",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/fa-IR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "فعال کردن ثبت نام\u200cهای جدید",
 	"Enable Web Search": "فعالسازی جستجوی وب",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "اطمینان حاصل کنید که فایل CSV شما شامل چهار ستون در این ترتیب است: نام، ایمیل، رمز عبور، نقش.",
@@ -367,6 +368,7 @@
 	"Last Active": "آخرین فعال",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "روشن",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "مدل\u200cهای زبانی بزرگ می\u200cتوانند اشتباه کنند. اطلاعات مهم را راستی\u200cآزمایی کنید.",
@@ -538,7 +540,6 @@
 	"Search Models": "مدل های جستجو",
 	"Search Prompts": "جستجوی پرامپت\u200cها",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "تعداد نتایج جستجو",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/fi-FI/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Salli uudet rekisteröitymiset",
 	"Enable Web Search": "Ota verkkohaku käyttöön",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Varmista, että CSV-tiedostossasi on 4 saraketta seuraavassa järjestyksessä: Nimi, Sähköposti, Salasana, Rooli.",
@@ -367,6 +368,7 @@
 	"Last Active": "Viimeksi aktiivinen",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Vaalea",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "Kielimallit voivat tehdä virheitä. Varmista tärkeät tiedot.",
@@ -538,7 +540,6 @@
 	"Search Models": "Hae malleja",
 	"Search Prompts": "Hae kehotteita",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Hakutulosten määrä",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/fr-CA/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Activer les nouvelles inscriptions",
 	"Enable Web Search": "Activer la recherche sur le Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "Moteur",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Vérifiez que votre fichier CSV comprenne les 4 colonnes dans cet ordre : Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Dernière activité",
 	"Last Modified": "Dernière modification",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Lumineux",
 	"Listening...": "En train d'écouter...",
 	"LLMs can make mistakes. Verify important information.": "Les LLM peuvent faire des erreurs. Vérifiez les informations importantes.",
@@ -538,7 +540,6 @@
 	"Search Models": "Rechercher des modèles",
 	"Search Prompts": "Recherche de prompts",
 	"Search Query Generation Prompt": "Génération d'interrogation de recherche",
-	"Search Query Generation Prompt Length Threshold": "Seuil de longueur de prompt de génération de requête de recherche",
 	"Search Result Count": "Nombre de résultats de recherche",
 	"Search Tools": "Outils de recherche",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/fr-FR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "Activer l'évaluation des messages",
 	"Enable New Sign Ups": "Activer les nouvelles inscriptions",
 	"Enable Web Search": "Activer la recherche web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Activé",
 	"Engine": "Moteur",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Vérifiez que votre fichier CSV comprenne les 4 colonnes dans cet ordre : Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Dernière activité",
 	"Last Modified": "Dernière modification",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Lumineux",
 	"Listening...": "En train d'écouter...",
 	"LLMs can make mistakes. Verify important information.": "Les LLM peuvent faire des erreurs. Vérifiez les informations importantes.",
@@ -538,7 +540,6 @@
 	"Search Models": "Rechercher des modèles",
 	"Search Prompts": "Recherche de prompts",
 	"Search Query Generation Prompt": "Génération d'interrogation de recherche",
-	"Search Query Generation Prompt Length Threshold": "Seuil de longueur de prompt de génération de requête de recherche",
 	"Search Result Count": "Nombre de résultats de recherche",
 	"Search Tools": "Outils de recherche",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/he-IL/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "אפשר הרשמות חדשות",
 	"Enable Web Search": "הפיכת חיפוש באינטרנט לזמין",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "ודא שקובץ ה-CSV שלך כולל 4 עמודות בסדר הבא: שם, דוא\"ל, סיסמה, תפקיד.",
@@ -367,6 +368,7 @@
 	"Last Active": "פעיל לאחרונה",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "בהיר",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "מודלים בשפה טבעית יכולים לטעות. אמת מידע חשוב.",
@@ -538,7 +540,6 @@
 	"Search Models": "חיפוש מודלים",
 	"Search Prompts": "חפש פקודות",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "ספירת תוצאות חיפוש",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/hi-IN/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "नए साइन अप सक्रिय करें",
 	"Enable Web Search": "वेब खोज सक्षम करें",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "सुनिश्चित करें कि आपकी CSV फ़ाइल में इस क्रम में 4 कॉलम शामिल हैं: नाम, ईमेल, पासवर्ड, भूमिका।",
@@ -367,6 +368,7 @@
 	"Last Active": "पिछली बार सक्रिय",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "सुन",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "एलएलएम गलतियाँ कर सकते हैं। महत्वपूर्ण जानकारी सत्यापित करें.",
@@ -538,7 +540,6 @@
 	"Search Models": "मॉडल खोजें",
 	"Search Prompts": "प्रॉम्प्ट खोजें",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "खोज परिणामों की संख्या",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/hr-HR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Omogući nove prijave",
 	"Enable Web Search": "Omogući pretraživanje weba",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Provjerite da vaša CSV datoteka uključuje 4 stupca u ovom redoslijedu: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Zadnja aktivnost",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Svijetlo",
 	"Listening...": "Slušam...",
 	"LLMs can make mistakes. Verify important information.": "LLM-ovi mogu pogriješiti. Provjerite važne informacije.",
@@ -538,7 +540,6 @@
 	"Search Models": "Pretražite modele",
 	"Search Prompts": "Pretraga prompta",
 	"Search Query Generation Prompt": "Upit za generiranje upita za pretraživanje",
-	"Search Query Generation Prompt Length Threshold": "Prag duljine upita za generiranje upita za pretraživanje",
 	"Search Result Count": "Broj rezultata pretraživanja",
 	"Search Tools": "Alati za pretraživanje",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/id-ID/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Aktifkan Pendaftaran Baru",
 	"Enable Web Search": "Aktifkan Pencarian Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Pastikan file CSV Anda menyertakan 4 kolom dengan urutan sebagai berikut: Nama, Email, Kata Sandi, Peran.",
@@ -367,6 +368,7 @@
 	"Last Active": "Terakhir Aktif",
 	"Last Modified": "Terakhir Dimodifikasi",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Cahaya",
 	"Listening...": "Mendengarkan",
 	"LLMs can make mistakes. Verify important information.": "LLM dapat membuat kesalahan. Verifikasi informasi penting.",
@@ -538,7 +540,6 @@
 	"Search Models": "Cari Model",
 	"Search Prompts": "Perintah Pencarian",
 	"Search Query Generation Prompt": "Permintaan Pembuatan Kueri Pencarian",
-	"Search Query Generation Prompt Length Threshold": "Ambang Batas Panjang Permintaan Pembuatan Kueri Pencarian",
 	"Search Result Count": "Jumlah Hasil Pencarian",
 	"Search Tools": "Alat Pencarian",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/it-IT/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Abilita nuove iscrizioni",
 	"Enable Web Search": "Abilita ricerca Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Assicurati che il tuo file CSV includa 4 colonne in questo ordine: Nome, Email, Password, Ruolo.",
@@ -367,6 +368,7 @@
 	"Last Active": "Ultima attività",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Chiaro",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "Gli LLM possono commettere errori. Verifica le informazioni importanti.",
@@ -538,7 +540,6 @@
 	"Search Models": "Cerca modelli",
 	"Search Prompts": "Cerca prompt",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Conteggio dei risultati della ricerca",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ja-JP/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "新規登録を有効化",
 	"Enable Web Search": "Web 検索を有効にする",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "CSVファイルに4つの列が含まれていることを確認してください: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "最終アクティブ",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "ライト",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLM は間違いを犯す可能性があります。重要な情報を検証してください。",
@@ -538,7 +540,6 @@
 	"Search Models": "モデル検索",
 	"Search Prompts": "プロンプトを検索",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "検索結果数",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ka-GE/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "ახალი რეგისტრაციების ჩართვა",
 	"Enable Web Search": "ვებ ძიების ჩართვა",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "გთხოვთ, უზრუნველყოთ, რომთქვევის CSV-ფაილი შეიცავს 4 ველი, ჩაწერილი ორივე ველი უდრის პირველი ველით.",
@@ -367,6 +368,7 @@
 	"Last Active": "ბოლო აქტიური",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "მსუბუქი",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "შესაძლოა LLM-ებმა შეცდომები დაუშვან. გადაამოწმეთ მნიშვნელოვანი ინფორმაცია.",
@@ -538,7 +540,6 @@
 	"Search Models": "საძიებო მოდელები",
 	"Search Prompts": "მოთხოვნების ძიება",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "ძიების შედეგების რაოდენობა",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ko-KR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "새 회원가입 활성화",
 	"Enable Web Search": "웹 검색 활성화",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "CSV 파일에 이름, 이메일, 비밀번호, 역할 4개의 컬럼이 순서대로 포함되어 있는지 확인하세요.",
@@ -367,6 +368,7 @@
 	"Last Active": "최근 활동",
 	"Last Modified": "마지막 수정",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Light",
 	"Listening...": "듣는 중...",
 	"LLMs can make mistakes. Verify important information.": "LLM은 실수를 할 수 있습니다. 중요한 정보는 확인이 필요합니다.",
@@ -538,7 +540,6 @@
 	"Search Models": "모델 검색",
 	"Search Prompts": "프롬프트 검색",
 	"Search Query Generation Prompt": "검색 쿼리 생성 프롬프트",
-	"Search Query Generation Prompt Length Threshold": "검색 쿼리 생성 프롬프트 길이 임계치",
 	"Search Result Count": "검색 결과 수",
 	"Search Tools": "검색 도구",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/lt-LT/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Aktyvuoti naujas registracijas",
 	"Enable Web Search": "Leisti paiešką internete",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Leisti",
 	"Engine": "Variklis",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Įsitikinkite, kad CSV failas turi 4 kolonas šiuo eiliškumu: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Paskutinį kartą aktyvus",
 	"Last Modified": "Paskutinis pakeitimas",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Šviesus",
 	"Listening...": "Klausoma...",
 	"LLMs can make mistakes. Verify important information.": "Dideli kalbos modeliai gali klysti. Patikrinkite atsakymų teisingumą.",
@@ -538,7 +540,6 @@
 	"Search Models": "Ieškoti modelių",
 	"Search Prompts": "Ieškoti užklausų",
 	"Search Query Generation Prompt": "Paieškos užklausos generavimo formuluotė",
-	"Search Query Generation Prompt Length Threshold": "Paieškos užklausos generavimo formuluotės ilgio riba",
 	"Search Result Count": "Paieškos rezultatų skaičius",
 	"Search Tools": "Paieškos įrankiai",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ms-MY/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Benarkan Pendaftaran Baharu",
 	"Enable Web Search": "Benarkan Carian Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Dibenarkan",
 	"Engine": "Enjin",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "astikan fail CSV anda mengandungi 4 lajur dalam susunan ini: Nama, E-mel, Kata Laluan, Peranan.",
@@ -367,6 +368,7 @@
 	"Last Active": "Dilihat aktif terakhir pada",
 	"Last Modified": "Kemaskini terakhir pada",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Cerah",
 	"Listening...": "Mendengar...",
 	"LLMs can make mistakes. Verify important information.": "LLM boleh membuat kesilapan. Sahkan maklumat penting",
@@ -538,7 +540,6 @@
 	"Search Models": "Carian Model",
 	"Search Prompts": "Carian Gesaan",
 	"Search Query Generation Prompt": "Carian Penjanaan Pertanyaan Gesaan",
-	"Search Query Generation Prompt Length Threshold": "Had Panjang Gesaan Penjanaan Pertanyaan Carian",
 	"Search Result Count": "Kiraan Hasil Carian",
 	"Search Tools": "Alat Carian",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/nb-NO/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Aktiver nye registreringer",
 	"Enable Web Search": "Aktiver websøk",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Aktivert",
 	"Engine": "Motor",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Sørg for at CSV-filen din inkluderer 4 kolonner i denne rekkefølgen: Navn, E-post, Passord, Rolle.",
@@ -367,6 +368,7 @@
 	"Last Active": "Sist aktiv",
 	"Last Modified": "Sist endret",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Lys",
 	"Listening...": "Lytter ...",
 	"LLMs can make mistakes. Verify important information.": "Språkmodeller kan gjøre feil. Verifiser viktige opplysninger.",
@@ -538,7 +540,6 @@
 	"Search Models": "Søk modeller",
 	"Search Prompts": "Søk prompter",
 	"Search Query Generation Prompt": "Instruksjon for å lage søkeord",
-	"Search Query Generation Prompt Length Threshold": "Lengdegrense for prompt til generering av søkeforespørsel",
 	"Search Result Count": "Antall søkeresultater",
 	"Search Tools": "Søkeverktøy",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/nl-NL/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Schakel Nieuwe Registraties in",
 	"Enable Web Search": "Zoeken op het web inschakelen",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Zorg ervoor dat uw CSV-bestand de volgende vier kolommen in deze volgorde bevat: Naam, E-mail, Wachtwoord, Rol.",
@@ -367,6 +368,7 @@
 	"Last Active": "Laatst Actief",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Licht",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLMs kunnen fouten maken. Verifieer belangrijke informatie.",
@@ -538,7 +540,6 @@
 	"Search Models": "Modellen zoeken",
 	"Search Prompts": "Zoek Prompts",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Aantal zoekresultaten",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/pa-IN/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "ਨਵੇਂ ਸਾਈਨ ਅਪ ਯੋਗ ਕਰੋ",
 	"Enable Web Search": "ਵੈੱਬ ਖੋਜ ਨੂੰ ਸਮਰੱਥ ਕਰੋ",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "ਸੁਨਿਸ਼ਚਿਤ ਕਰੋ ਕਿ ਤੁਹਾਡੀ CSV ਫਾਈਲ ਵਿੱਚ ਇਸ ਕ੍ਰਮ ਵਿੱਚ 4 ਕਾਲਮ ਹਨ: ਨਾਮ, ਈਮੇਲ, ਪਾਸਵਰਡ, ਭੂਮਿਕਾ।",
@@ -367,6 +368,7 @@
 	"Last Active": "ਆਖਰੀ ਸਰਗਰਮ",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "ਹਲਕਾ",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLMs ਗਲਤੀਆਂ ਕਰ ਸਕਦੇ ਹਨ। ਮਹੱਤਵਪੂਰਨ ਜਾਣਕਾਰੀ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ।",
@@ -538,7 +540,6 @@
 	"Search Models": "ਖੋਜ ਮਾਡਲ",
 	"Search Prompts": "ਪ੍ਰੰਪਟ ਖੋਜੋ",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "ਖੋਜ ਨਤੀਜੇ ਦੀ ਗਿਣਤੀ",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/pl-PL/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Włącz nowe rejestracje",
 	"Enable Web Search": "Włączanie wyszukiwania w Internecie",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Upewnij się, że twój plik CSV zawiera 4 kolumny w następującym porządku: Nazwa, Email, Hasło, Rola.",
@@ -367,6 +368,7 @@
 	"Last Active": "Ostatnio aktywny",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Jasny",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "LLMy mogą popełniać błędy. Zweryfikuj ważne informacje.",
@@ -538,7 +540,6 @@
 	"Search Models": "Szukaj modeli",
 	"Search Prompts": "Szukaj promptów",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Liczba wyników wyszukiwania",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/pt-BR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Ativar Novos Cadastros",
 	"Enable Web Search": "Ativar Pesquisa na Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Ativado",
 	"Engine": "Motor",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Certifique-se de que seu arquivo CSV inclua 4 colunas nesta ordem: Nome, Email, Senha, Função.",
@@ -367,6 +368,7 @@
 	"Last Active": "Última Atividade",
 	"Last Modified": "Última Modificação",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Claro",
 	"Listening...": "Escutando...",
 	"LLMs can make mistakes. Verify important information.": "LLMs podem cometer erros. Verifique informações importantes.",
@@ -538,7 +540,6 @@
 	"Search Models": "Pesquisar Modelos",
 	"Search Prompts": "Pesquisar Prompts",
 	"Search Query Generation Prompt": "Prompt de Geração de Consulta de Pesquisa",
-	"Search Query Generation Prompt Length Threshold": "Limiar de Comprimento do Prompt de Geração de Consulta de Pesquisa",
 	"Search Result Count": "Contagem de Resultados da Pesquisa",
 	"Search Tools": "Pesquisar Ferramentas",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/pt-PT/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Ativar Novas Inscrições",
 	"Enable Web Search": "Ativar pesquisa na Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Confirme que o seu ficheiro CSV inclui 4 colunas nesta ordem: Nome, E-mail, Senha, Função.",
@@ -367,6 +368,7 @@
 	"Last Active": "Último Ativo",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Claro",
 	"Listening...": "A escutar...",
 	"LLMs can make mistakes. Verify important information.": "LLMs podem cometer erros. Verifique informações importantes.",
@@ -538,7 +540,6 @@
 	"Search Models": "Modelos de pesquisa",
 	"Search Prompts": "Pesquisar Prompts",
 	"Search Query Generation Prompt": "Prompt de geração de consulta de pesquisa",
-	"Search Query Generation Prompt Length Threshold": "Limite de comprimento do prompt de geração de consulta de pesquisa",
 	"Search Result Count": "Contagem de resultados da pesquisa",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ro-RO/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Activează Înscrierile Noi",
 	"Enable Web Search": "Activează Căutarea pe Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Activat",
 	"Engine": "Motor",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Asigurați-vă că fișierul CSV include 4 coloane în această ordine: Nume, Email, Parolă, Rol.",
@@ -367,6 +368,7 @@
 	"Last Active": "Ultima Activitate",
 	"Last Modified": "Ultima Modificare",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Luminos",
 	"Listening...": "Ascult...",
 	"LLMs can make mistakes. Verify important information.": "LLM-urile pot face greșeli. Verificați informațiile importante.",
@@ -538,7 +540,6 @@
 	"Search Models": "Caută Modele",
 	"Search Prompts": "Caută Prompturi",
 	"Search Query Generation Prompt": "Prompt de Generare Interogare de Căutare",
-	"Search Query Generation Prompt Length Threshold": "Prag Lungime Prompt de Generare Interogare de Căutare",
 	"Search Result Count": "Număr Rezultate Căutare",
 	"Search Tools": "Caută Instrumente",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/ru-RU/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Разрешить новые регистрации",
 	"Enable Web Search": "Включить поиск в Интернете",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Включено",
 	"Engine": "Движок",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Убедитесь, что ваш CSV-файл включает в себя 4 столбца в следующем порядке: Имя, Электронная почта, Пароль, Роль.",
@@ -367,6 +368,7 @@
 	"Last Active": "Последний активный",
 	"Last Modified": "Последнее изменение",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Светлый",
 	"Listening...": "Слушаю...",
 	"LLMs can make mistakes. Verify important information.": "LLMs могут допускать ошибки. Проверяйте важную информацию.",
@@ -538,7 +540,6 @@
 	"Search Models": "Поиск моделей",
 	"Search Prompts": "Поиск промптов",
 	"Search Query Generation Prompt": "Промпт для генерации поискового запроса",
-	"Search Query Generation Prompt Length Threshold": "Пороговое значение длины промпта для генерации поисковых запросов",
 	"Search Result Count": "Количество результатов поиска",
 	"Search Tools": "Поиск инструментов",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/sr-RS/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Омогући нове пријаве",
 	"Enable Web Search": "Омогући Wеб претрагу",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Уверите се да ваша CSV датотека укључује 4 колоне у овом редоследу: Име, Е-пошта, Лозинка, Улога.",
@@ -367,6 +368,7 @@
 	"Last Active": "Последња активност",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Светла",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "ВЈМ-ови (LLM-ови) могу правити грешке. Проверите важне податке.",
@@ -538,7 +540,6 @@
 	"Search Models": "Модели претраге",
 	"Search Prompts": "Претражи упите",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "Број резултата претраге",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/sv-SE/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Aktivera nya registreringar",
 	"Enable Web Search": "Aktivera webbsökning",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Se till att din CSV-fil innehåller fyra kolumner i denna ordning: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Senast aktiv",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Ljus",
 	"Listening...": "Lyssnar...",
 	"LLMs can make mistakes. Verify important information.": "LLM:er kan göra misstag. Granska viktig information.",
@@ -538,7 +540,6 @@
 	"Search Models": "Sök modeller",
 	"Search Prompts": "Sök instruktioner",
 	"Search Query Generation Prompt": "Instruktion för generering av sökfrågor",
-	"Search Query Generation Prompt Length Threshold": "Tröskelvärde för generering av sökfrågor",
 	"Search Result Count": "Antal sökresultat",
 	"Search Tools": "Sökverktyg",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/th-TH/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "เปิดใช้งานการสมัครใหม่",
 	"Enable Web Search": "เปิดใช้งานการค้นหาเว็บ",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "เปิดใช้งาน",
 	"Engine": "เครื่องยนต์",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "ตรวจสอบว่าไฟล์ CSV ของคุณมี 4 คอลัมน์ในลำดับนี้: ชื่อ, อีเมล, รหัสผ่าน, บทบาท",
@@ -367,6 +368,7 @@
 	"Last Active": "ใช้งานล่าสุด",
 	"Last Modified": "แก้ไขล่าสุด",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "แสง",
 	"Listening...": "กำลังฟัง...",
 	"LLMs can make mistakes. Verify important information.": "LLMs สามารถทำผิดพลาดได้ ตรวจสอบข้อมูลสำคัญ",
@@ -538,7 +540,6 @@
 	"Search Models": "ค้นหาโมเดล",
 	"Search Prompts": "ค้นหาพรอมต์",
 	"Search Query Generation Prompt": "พรอมต์การสร้างคำค้นหา",
-	"Search Query Generation Prompt Length Threshold": "เกณฑ์ความยาวของพรอมต์การสร้างคำค้นหา",
 	"Search Result Count": "จำนวนผลลัพธ์การค้นหา",
 	"Search Tools": "เครื่องมือค้นหา",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/tk-TW/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "",
 	"Enable Web Search": "",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
@@ -367,6 +368,7 @@
 	"Last Active": "",
 	"Last Modified": "",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "",
 	"Listening...": "",
 	"LLMs can make mistakes. Verify important information.": "",
@@ -538,7 +540,6 @@
 	"Search Models": "",
 	"Search Prompts": "",
 	"Search Query Generation Prompt": "",
-	"Search Query Generation Prompt Length Threshold": "",
 	"Search Result Count": "",
 	"Search Tools": "",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/tr-TR/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "Yeni Kayıtları Etkinleştir",
 	"Enable Web Search": "Web Aramasını Etkinleştir",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "CSV dosyanızın şu sırayla 4 sütun içerdiğinden emin olun: İsim, E-posta, Şifre, Rol.",
@@ -367,6 +368,7 @@
 	"Last Active": "Son Aktivite",
 	"Last Modified": "Son Düzenleme",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Açık",
 	"Listening...": "Dinleniyor...",
 	"LLMs can make mistakes. Verify important information.": "LLM'ler hata yapabilir. Önemli bilgileri doğrulayın.",
@@ -538,7 +540,6 @@
 	"Search Models": "Modelleri Ara",
 	"Search Prompts": "Prompt Ara",
 	"Search Query Generation Prompt": "Arama Sorgusu Üretme Promptu",
-	"Search Query Generation Prompt Length Threshold": "Arama Sorgusu Üretme Promptu Uzunluk Sınırı",
 	"Search Result Count": "Arama Sonucu Sayısı",
 	"Search Tools": "Arama Araçları",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/uk-UA/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "Увімкнути оцінку повідомлень",
 	"Enable New Sign Ups": "Дозволити нові реєстрації",
 	"Enable Web Search": "Увімкнути веб-пошук",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Увімкнено",
 	"Engine": "Рушій",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Переконайтеся, що ваш CSV-файл містить 4 колонки в такому порядку: Ім'я, Email, Пароль, Роль.",
@@ -367,6 +368,7 @@
 	"Last Active": "Остання активність",
 	"Last Modified": "Востаннє змінено",
 	"Leave empty for unlimited": "Залиште порожнім для необмеженого розміру",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Світла",
 	"Listening...": "Слухаю...",
 	"LLMs can make mistakes. Verify important information.": "LLMs можуть помилятися. Перевірте важливу інформацію.",
@@ -538,7 +540,6 @@
 	"Search Models": "Пошук моделей",
 	"Search Prompts": "Пошук промтів",
 	"Search Query Generation Prompt": "Підказка для формування пошукового промту",
-	"Search Query Generation Prompt Length Threshold": "Поріг довжини пошукового запиту для генерації підказки",
 	"Search Result Count": "Кількість результатів пошуку",
 	"Search Tools": "Пошуку інструментів",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/vi-VN/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "Cho phép phản hồi, đánh giá",
 	"Enable New Sign Ups": "Cho phép đăng ký mới",
 	"Enable Web Search": "Cho phép tìm kiếm Web",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "Đã bật",
 	"Engine": "",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Đảm bảo tệp CSV của bạn bao gồm 4 cột theo thứ tự sau: Name, Email, Password, Role.",
@@ -367,6 +368,7 @@
 	"Last Active": "Truy cập gần nhất",
 	"Last Modified": "Lần sửa gần nhất",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "Sáng",
 	"Listening...": "Đang nghe...",
 	"LLMs can make mistakes. Verify important information.": "Hệ thống có thể tạo ra nội dung không chính xác hoặc sai. Hãy kiểm chứng kỹ lưỡng thông tin trước khi tiếp nhận và sử dụng.",
@@ -538,7 +540,6 @@
 	"Search Models": "Tìm model",
 	"Search Prompts": "Tìm prompt",
 	"Search Query Generation Prompt": "Prompt tạo câu truy vấn, tìm kiếm",
-	"Search Query Generation Prompt Length Threshold": "Ngưỡng độ dài prompt tạo câu truy vấn, tìm kiếm",
 	"Search Result Count": "Số kết quả tìm kiếm",
 	"Search Tools": "Tìm kiếm Tools",
 	"SearchApi API Key": "",

+ 2 - 1
src/lib/i18n/locales/zh-CN/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "启用消息评价",
 	"Enable New Sign Ups": "允许新用户注册",
 	"Enable Web Search": "启用网络搜索",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "启用",
 	"Engine": "引擎",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "确保您的 CSV 文件按以下顺序包含 4 列: 姓名、电子邮箱、密码、角色。",
@@ -367,6 +368,7 @@
 	"Last Active": "最后在线时间",
 	"Last Modified": "最后修改时间",
 	"Leave empty for unlimited": "留空表示无限制",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "浅色",
 	"Listening...": "正在倾听...",
 	"LLMs can make mistakes. Verify important information.": "大语言模型可能会生成误导性错误信息,请对关键信息加以验证。",
@@ -538,7 +540,6 @@
 	"Search Models": "搜索模型",
 	"Search Prompts": "搜索提示词",
 	"Search Query Generation Prompt": "搜索查询生成提示",
-	"Search Query Generation Prompt Length Threshold": "搜索查询生成提示长度阈值",
 	"Search Result Count": "搜索结果数量",
 	"Search Tools": "搜索工具",
 	"SearchApi API Key": "SearchApi API 密钥",

+ 2 - 1
src/lib/i18n/locales/zh-TW/translation.json

@@ -230,6 +230,7 @@
 	"Enable Message Rating": "",
 	"Enable New Sign Ups": "允許新使用者註冊",
 	"Enable Web Search": "啟用網頁搜尋",
+	"Enable Web Search Query Generation": "",
 	"Enabled": "已啟用",
 	"Engine": "引擎",
 	"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "請確認您的 CSV 檔案包含以下 4 個欄位,並按照此順序排列:名稱、電子郵件、密碼、角色。",
@@ -367,6 +368,7 @@
 	"Last Active": "上次活動時間",
 	"Last Modified": "上次修改時間",
 	"Leave empty for unlimited": "",
+	"Leave empty to use the default prompt, or enter a custom prompt": "",
 	"Light": "淺色",
 	"Listening...": "正在聆聽...",
 	"LLMs can make mistakes. Verify important information.": "大型語言模型可能會出錯。請驗證重要資訊。",
@@ -538,7 +540,6 @@
 	"Search Models": "搜尋模型",
 	"Search Prompts": "搜尋提示詞",
 	"Search Query Generation Prompt": "搜尋查詢生成提示詞",
-	"Search Query Generation Prompt Length Threshold": "搜尋查詢生成提示詞長度閾值",
 	"Search Result Count": "搜尋結果數量",
 	"Search Tools": "搜尋工具",
 	"SearchApi API Key": "",