From 4e6d165d00e0dbdc268be3f41440e83fba0ddb2f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 27 Jun 2024 00:43:31 -0700 Subject: [PATCH 01/17] refac --- .../workspace/functions/create/+page.svelte | 26 ++++++++++++------- .../(app)/workspace/tools/create/+page.svelte | 26 ++++++++++++------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/routes/(app)/workspace/functions/create/+page.svelte b/src/routes/(app)/workspace/functions/create/+page.svelte index 118668c83..49711b8ae 100644 --- a/src/routes/(app)/workspace/functions/create/+page.svelte +++ b/src/routes/(app)/workspace/functions/create/+page.svelte @@ -48,6 +48,10 @@ console.log(func); }); + if (window.opener ?? false) { + window.opener.postMessage('loaded', '*'); + } + if (sessionStorage.function) { func = JSON.parse(sessionStorage.function); sessionStorage.removeItem('function'); @@ -61,14 +65,16 @@ {#if mounted} - { - saveHandler(e.detail); - }} - /> + {#key func?.content} + { + saveHandler(e.detail); + }} + /> + {/key} {/if} diff --git a/src/routes/(app)/workspace/tools/create/+page.svelte b/src/routes/(app)/workspace/tools/create/+page.svelte index daa6b7acd..a3e243c21 100644 --- a/src/routes/(app)/workspace/tools/create/+page.svelte +++ b/src/routes/(app)/workspace/tools/create/+page.svelte @@ -45,6 +45,10 @@ console.log(tool); }); + if (window.opener ?? false) { + window.opener.postMessage('loaded', '*'); + } + if (sessionStorage.tool) { tool = JSON.parse(sessionStorage.tool); sessionStorage.removeItem('tool'); @@ -58,14 +62,16 @@ {#if mounted} - { - saveHandler(e.detail); - }} - /> + {#key tool?.content} + { + saveHandler(e.detail); + }} + /> + {/key} {/if} From a5138b76210a12d245a8a4683aea7487a6258eb0 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 27 Jun 2024 03:24:16 -0700 Subject: [PATCH 02/17] doc: changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6756d105b..e6c160076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,35 @@ 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.6] - 2024-06-27 + +### Added + +- **✨ "Functions" Feature**: You can now utilize "Functions" like filters (middleware) and pipe (model) functions directly within the WebUI. While largely compatible with Pipelines, these native functions can be executed easily within Open WebUI. Example use cases for filter functions include usage monitoring, real-time translation, moderation, and automemory. For pipe functions, the scope ranges from Cohere and Anthropic integration directly within Open WebUI, enabling "Valves" for per-user OpenAI API key usage, and much more. If you encounter issues, SAFE_MODE has been introduced. +- **📁 Files API**: Compatible with OpenAI, this feature allows for custom Retrieval-Augmented Generation (RAG) in conjunction with the Filter Function. More examples will be shared on our community platform and official documentation website. +- **🛠️ Tool Enhancements**: Tools now support citations and "Valves". Documentation will be available shortly. +- **🔗 Iframe Support via Files API**: Enables rendering HTML directly into your chat interface using functions and tools. Use cases include playing games like DOOM and Snake, displaying a weather applet, and implementing Anthropic "artifacts"-like features. Stay tuned for updates on our community platform and documentation. +- **🔑 AUTOMATIC1111_API_AUTH Support**: Support for automated API authentication. +- **🎨 Code Highlight Optimization**: Improved code highlighting features. +- **🔒 Experimental OAuth Support**: Check our docs for more details on this new feature. +- **🎙️ Voice Interruption Feature**: Reintroduced and now toggleable from Settings > Interface. +- **💤 Wakelock API**: Now in use to prevent screen dimming during important tasks. +- **🔐 API Key Privacy**: All API keys are now hidden by default for better security. +- **🔍 New Web Search Provider**: Added jina_search as a new option. +- **🌐 Enhanced Internationalization (i18n)**: Improved Korean translation and updated Chinese and Ukrainian translations. + +### Fixed + +- **🔧 Conversation Mode Issue**: Fixed the issue where Conversation Mode remained active after being removed from settings. +- **📏 Scroll Button Obstruction**: Resolved the issue where the scrollToBottom button container obstructed clicks on buttons beneath it. + +### Changed + +- **⏲️ AIOHTTP_CLIENT_TIMEOUT**: Now set to `None` by default for improved configuration flexibility. +- **📞 Voice Call Enhancements**: Improved by skipping code blocks and expressions during calls. +- **🚫 Error Message Handling**: Disabled the continuation of operations with error messages. +- **🗂️ Playground Relocation**: Moved the Playground from the workspace to the user menu for better user experience. + ## [0.3.5] - 2024-06-16 ### Added diff --git a/package-lock.json b/package-lock.json index b544a87d9..bd4bc6892 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "open-webui", - "version": "0.3.6.dev1", + "version": "0.3.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "open-webui", - "version": "0.3.6.dev1", + "version": "0.3.6", "dependencies": { "@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-python": "^6.1.6", diff --git a/package.json b/package.json index c829c6092..bb17cd4c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-webui", - "version": "0.3.6.dev1", + "version": "0.3.6", "private": true, "scripts": { "dev": "npm run pyodide:fetch && vite dev --host", From bae87ec4ae5fe9f82b7a8d134f4b11f902ab3218 Mon Sep 17 00:00:00 2001 From: Ismael Date: Thu, 27 Jun 2024 07:08:03 -0400 Subject: [PATCH 03/17] Update translation.json Spanish translation updates --- src/lib/i18n/locales/es-ES/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index 657515620..0e7f3699e 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -659,7 +659,7 @@ "You have shared this chat": "Usted ha compartido esta conversación", "You're a helpful assistant.": "Usted es un asistente útil.", "You're now logged in.": "Usted ahora está conectado.", - "Your account status is currently pending activation.": "", + "Your account status is currently pending activation.": "El estado de su cuenta actualmente se encuentra pendiente de activación.", "Youtube": "Youtube", "Youtube Loader Settings": "Configuración del cargador de Youtube" } From 850d4aac70cd87bae0741a825bf7bba202a9237a Mon Sep 17 00:00:00 2001 From: Ismael Date: Thu, 27 Jun 2024 07:33:38 -0400 Subject: [PATCH 04/17] additional Spanish strings updated --- src/lib/i18n/locales/es-ES/translation.json | 291 ++++++++++---------- 1 file changed, 146 insertions(+), 145 deletions(-) diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index 0e7f3699e..cf8d7fb87 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -4,7 +4,7 @@ "(e.g. `sh webui.sh --api --api-auth username_password`)": "", "(e.g. `sh webui.sh --api`)": "(p.ej. `sh webui.sh --api`)", "(latest)": "(latest)", - "{{ models }}": "{{ modelos }}", + "{{ models }}": "{{ models }}", "{{ owner }}: You cannot delete a base model": "{{ owner }}: No se puede eliminar un modelo base", "{{modelName}} is thinking...": "{{modelName}} está pensando...", "{{user}}'s Chats": "{{user}}'s Chats", @@ -13,9 +13,9 @@ "a user": "un usuario", "About": "Sobre nosotros", "Account": "Cuenta", - "Account Activation Pending": "", + "Account Activation Pending": "Activación de cuenta pendiente", "Accurate information": "Información precisa", - "Active Users": "", + "Active Users": "Usuarios activos", "Add": "Agregar", "Add a model id": "Adición de un identificador de modelo", "Add a short description about what this model does": "Agregue una breve descripción sobre lo que hace este modelo", @@ -31,10 +31,10 @@ "Add User": "Agregar Usuario", "Adjusting these settings will apply changes universally to all users.": "Ajustar estas opciones aplicará los cambios universalmente a todos los usuarios.", "admin": "admin", - "Admin": "", + "Admin": "Admin", "Admin Panel": "Panel de Administración", "Admin Settings": "Configuración de Administrador", - "Admins have access to all tools at all times; users need tools assigned per model in the workspace.": "", + "Admins have access to all tools at all times; users need tools assigned per model in the workspace.": "Admins tienen acceso a todas las herramientas en todo momento; los usuarios necesitan herramientas asignadas por modelo en el espacio de trabajo.", "Advanced Parameters": "Parámetros Avanzados", "Advanced Params": "Parámetros avanzados", "all": "todo", @@ -42,9 +42,9 @@ "All Users": "Todos los Usuarios", "Allow": "Permitir", "Allow Chat Deletion": "Permitir Borrar Chats", - "Allow non-local voices": "", - "Allow User Location": "", - "Allow Voice Interruption in Call": "", + "Allow non-local voices": "Permitir voces no locales", + "Allow User Location": "Permitir Ubicación del Usuario", + "Allow Voice Interruption in Call": "Permitir interrupción de voz en llamada", "alphanumeric characters and hyphens": "caracteres alfanuméricos y guiones", "Already have an account?": "¿Ya tienes una cuenta?", "an assistant": "un asistente", @@ -63,7 +63,7 @@ "Attach file": "Adjuntar archivo", "Attention to detail": "Detalle preciso", "Audio": "Audio", - "Audio settings updated successfully": "", + "Audio settings updated successfully": "Opciones de audio actualizadas correctamente", "August": "Agosto", "Auto-playback response": "Respuesta de reproducción automática", "AUTOMATIC1111 Api Auth String": "", @@ -74,19 +74,19 @@ "Bad Response": "Respuesta incorrecta", "Banners": "Banners", "Base Model (From)": "Modelo base (desde)", - "Batch Size (num_batch)": "", + "Batch Size (num_batch)": "Tamaño del Batch (num_batch)", "before": "antes", "Being lazy": "Ser perezoso", "Brave Search API Key": "Clave de API de Brave Search", "Bypass SSL verification for Websites": "Desactivar la verificación SSL para sitios web", - "Call": "", - "Call feature is not supported when using Web STT engine": "", - "Camera": "", + "Call": "Llamada", + "Call feature is not supported when using Web STT engine": "La funcionalidad de llamada no puede usarse junto con el motor de STT Web", + "Camera": "Cámara", "Cancel": "Cancelar", "Capabilities": "Capacidades", "Change Password": "Cambia la Contraseña", "Chat": "Chat", - "Chat Background Image": "", + "Chat Background Image": "Imágen de fondo del Chat", "Chat Bubble UI": "Burbuja de chat UI", "Chat direction": "Dirección del Chat", "Chat History": "Historial del Chat", @@ -100,35 +100,35 @@ "Chunk Params": "Parámetros de fragmentos", "Chunk Size": "Tamaño de fragmentos", "Citation": "Cita", - "Clear memory": "", + "Clear memory": "Liberar memoria", "Click here for help.": "Presiona aquí para obtener ayuda.", "Click here to": "Presiona aquí para", - "Click here to download user import template file.": "", + "Click here to download user import template file.": "Presiona aquí para descargar el archivo de plantilla de importación de usuario.", "Click here to select": "Presiona aquí para seleccionar", "Click here to select a csv file.": "Presiona aquí para seleccionar un archivo csv.", - "Click here to select a py file.": "", + "Click here to select a py file.": "Presiona aquí para seleccionar un archivo py.", "Click here to select documents.": "Presiona aquí para seleccionar documentos", "click here.": "Presiona aquí.", "Click on the user role button to change a user's role.": "Presiona en el botón de roles del usuario para cambiar su rol.", - "Clipboard write permission denied. Please check your browser settings to grant the necessary access.": "", - "Clone": "Clon", + "Clipboard write permission denied. Please check your browser settings to grant the necessary access.": "Permisos de escritura del portapapeles denegados. Por favor, comprueba las configuraciones de tu navegador para otorgar el acceso necesario.", + "Clone": "Clonar", "Close": "Cerrar", - "Code formatted successfully": "", + "Code formatted successfully": "Se ha formateado correctamente el código.", "Collection": "Colección", "ComfyUI": "ComfyUI", "ComfyUI Base URL": "ComfyUI Base URL", "ComfyUI Base URL is required.": "ComfyUI Base URL es requerido.", "Command": "Comando", "Concurrent Requests": "Solicitudes simultáneas", - "Confirm": "", + "Confirm": "Confirmar", "Confirm Password": "Confirmar Contraseña", - "Confirm your action": "", + "Confirm your action": "Confirma tu acción", "Connections": "Conexiones", - "Contact Admin for WebUI Access": "", + "Contact Admin for WebUI Access": "Contacta el administrador para obtener acceso al WebUI", "Content": "Contenido", "Context Length": "Longitud del contexto", "Continue Response": "Continuar Respuesta", - "Continue with {{provider}}": "", + "Continue with {{provider}}": "Continuar con {{provider}}", "Copied shared chat URL to clipboard!": "¡URL de chat compartido copiado al portapapeles!", "Copy": "Copiar", "Copy last code block": "Copia el último bloque de código", @@ -141,14 +141,14 @@ "Create new secret key": "Crear una nueva clave secreta", "Created at": "Creado en", "Created At": "Creado en", - "Created by": "", - "CSV Import": "", + "Created by": "Creado por", + "CSV Import": "Importa un CSV", "Current Model": "Modelo Actual", "Current Password": "Contraseña Actual", "Custom": "Personalizado", "Customize models for a specific purpose": "Personalizar modelos para un propósito específico", "Dark": "Oscuro", - "Dashboard": "", + "Dashboard": "Panel de Control", "Database": "Base de datos", "December": "Diciembre", "Default": "Por defecto", @@ -164,7 +164,7 @@ "Delete All Chats": "Eliminar todos los chats", "Delete chat": "Borrar chat", "Delete Chat": "Borrar Chat", - "Delete chat?": "", + "Delete chat?": "Borrar el chat?", "Delete function?": "", "Delete prompt?": "", "delete this link": "Borrar este enlace", @@ -174,26 +174,26 @@ "Deleted {{name}}": "Eliminado {{nombre}}", "Description": "Descripción", "Didn't fully follow instructions": "No siguió las instrucciones", - "Discover a function": "", + "Discover a function": "Descubre una función", "Discover a model": "Descubrir un modelo", "Discover a prompt": "Descubre un Prompt", - "Discover a tool": "", - "Discover, download, and explore custom functions": "", + "Discover a tool": "Descubre una herramienta", + "Discover, download, and explore custom functions": "Descubre, descarga y explora funciones personalizadas", "Discover, download, and explore custom prompts": "Descubre, descarga, y explora Prompts personalizados", - "Discover, download, and explore custom tools": "", + "Discover, download, and explore custom tools": "Descubre, descarga y explora herramientas personalizadas", "Discover, download, and explore model presets": "Descubre, descarga y explora ajustes preestablecidos de modelos", - "Dismissible": "", - "Display Emoji in Call": "", + "Dismissible": "Desestimable", + "Display Emoji in Call": "Muestra Emoji en llamada", "Display the username instead of You in the Chat": "Mostrar el nombre de usuario en lugar de Usted en el chat", "Document": "Documento", "Document Settings": "Configuración del Documento", - "Documentation": "", + "Documentation": "Documentación", "Documents": "Documentos", "does not make any external connections, and your data stays securely on your locally hosted server.": "no realiza ninguna conexión externa y sus datos permanecen seguros en su servidor alojado localmente.", "Don't Allow": "No Permitir", "Don't have an account?": "¿No tienes una cuenta?", "Don't like the style": "No te gusta el estilo?", - "Done": "", + "Done": "Hecho", "Download": "Descargar", "Download canceled": "Descarga cancelada", "Download Database": "Descarga la Base de Datos", @@ -201,10 +201,10 @@ "e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "p.ej. '30s','10m'. Unidades válidas de tiempo son 's', 'm', 'h'.", "Edit": "Editar", "Edit Doc": "Editar Documento", - "Edit Memory": "", + "Edit Memory": "Editar Memoria", "Edit User": "Editar Usuario", "Email": "Email", - "Embedding Batch Size": "", + "Embedding Batch Size": "Tamaño de Embedding", "Embedding Model": "Modelo de Embedding", "Embedding Model Engine": "Motor de Modelo de Embedding", "Embedding model set to \"{{embedding_model}}\"": "Modelo de Embedding configurado a \"{{embedding_model}}\"", @@ -229,10 +229,10 @@ "Enter Score": "Ingrese la puntuación", "Enter Searxng Query URL": "Introduzca la URL de consulta de Searxng", "Enter Serper API Key": "Ingrese la clave API de Serper", - "Enter Serply API Key": "", + "Enter Serply API Key": "Ingrese la clave API de Serply", "Enter Serpstack API Key": "Ingrese la clave API de Serpstack", "Enter stop sequence": "Ingrese la secuencia de parada", - "Enter Tavily API Key": "", + "Enter Tavily API Key": "Ingrese la clave API de Tavily", "Enter Top K": "Ingrese el Top K", "Enter URL (e.g. http://127.0.0.1:7860/)": "Ingrese la URL (p.ej., http://127.0.0.1:7860/)", "Enter URL (e.g. http://localhost:11434)": "Ingrese la URL (p.ej., http://localhost:11434)", @@ -244,39 +244,39 @@ "Experimental": "Experimental", "Export": "Exportar", "Export All Chats (All Users)": "Exportar todos los chats (Todos los usuarios)", - "Export chat (.json)": "", + "Export chat (.json)": "Exportar chat (.json)", "Export Chats": "Exportar Chats", "Export Documents Mapping": "Exportar el mapeo de documentos", - "Export Functions": "", - "Export LiteLLM config.yaml": "", - "Export Models": "Modelos de exportación", + "Export Functions": "Exportar Funciones", + "Export LiteLLM config.yaml": "Exportar LiteLLM config.yaml", + "Export Models": "Exportar Modelos", "Export Prompts": "Exportar Prompts", - "Export Tools": "", - "External Models": "", + "Export Tools": "Exportar Herramientas", + "External Models": "Modelos Externos", "Failed to create API Key.": "No se pudo crear la clave API.", "Failed to read clipboard contents": "No se pudo leer el contenido del portapapeles", - "Failed to update settings": "", + "Failed to update settings": "Falla al actualizar los ajustes", "February": "Febrero", "Feel free to add specific details": "Libre de agregar detalles específicos", - "File": "", + "File": "Archivo", "File Mode": "Modo de archivo", "File not found.": "Archivo no encontrado.", - "Filters": "", + "Filters": "Filtros", "Fingerprint spoofing detected: Unable to use initials as avatar. Defaulting to default profile image.": "Se detectó suplantación de huellas: No se pueden usar las iniciales como avatar. Por defecto se utiliza la imagen de perfil predeterminada.", "Fluidly stream large external response chunks": "Transmita con fluidez grandes fragmentos de respuesta externa", "Focus chat input": "Enfoca la entrada del chat", "Followed instructions perfectly": "Siguió las instrucciones perfectamente", - "Form": "", + "Form": "De", "Format your variables using square brackets like this:": "Formatea tus variables usando corchetes de la siguiente manera:", "Frequency Penalty": "Penalización de frecuencia", - "Function created successfully": "", - "Function deleted successfully": "", - "Function updated successfully": "", - "Functions": "", - "Functions imported successfully": "", + "Function created successfully": "Función creada exitosamente", + "Function deleted successfully": "Función borrada exitosamente", + "Function updated successfully": "Función actualizada exitosamente", + "Functions": "Funciones", + "Functions imported successfully": "Funciones importadas exitosamente", "General": "General", "General Settings": "Opciones Generales", - "Generate Image": "", + "Generate Image": "Generar imagen", "Generating search query": "Generación de consultas de búsqueda", "Generation Info": "Información de Generación", "Good Response": "Buena Respuesta", @@ -287,7 +287,7 @@ "Hello, {{name}}": "Hola, {{name}}", "Help": "Ayuda", "Hide": "Esconder", - "Hide Model": "", + "Hide Model": "Esconder Modelo", "How can I help you today?": "¿Cómo puedo ayudarte hoy?", "Hybrid Search": "Búsqueda Híbrida", "Image Generation (Experimental)": "Generación de imágenes (experimental)", @@ -296,16 +296,16 @@ "Images": "Imágenes", "Import Chats": "Importar chats", "Import Documents Mapping": "Importar Mapeo de Documentos", - "Import Functions": "", + "Import Functions": "Importar Funciones", "Import Models": "Importar modelos", "Import Prompts": "Importar Prompts", - "Import Tools": "", + "Import Tools": "Importar Herramientas", "Include `--api-auth` flag when running stable-diffusion-webui": "", "Include `--api` flag when running stable-diffusion-webui": "Incluir el indicador `--api` al ejecutar stable-diffusion-webui", "Info": "Información", "Input commands": "Ingresar comandos", "Install from Github URL": "Instalar desde la URL de Github", - "Instant Auto-Send After Voice Transcription": "", + "Instant Auto-Send After Voice Transcription": "Auto-Enviar Después de la Transcripción de Voz", "Interface": "Interfaz", "Invalid Tag": "Etiqueta Inválida", "January": "Enero", @@ -318,32 +318,32 @@ "JWT Token": "Token JWT", "Keep Alive": "Mantener Vivo", "Keyboard shortcuts": "Atajos de teclado", - "Knowledge": "", + "Knowledge": "Conocimiento", "Language": "Lenguaje", "Last Active": "Última Actividad", - "Last Modified": "", + "Last Modified": "Modificado por última vez", "Light": "Claro", - "Listening...": "", + "Listening...": "Escuchando...", "LLMs can make mistakes. Verify important information.": "Los LLM pueden cometer errores. Verifica la información importante.", - "Local Models": "", + "Local Models": "Modelos locales", "LTR": "LTR", "Made by OpenWebUI Community": "Hecho por la comunidad de OpenWebUI", "Make sure to enclose them with": "Asegúrese de adjuntarlos con", - "Manage": "", + "Manage": "Gestionar", "Manage Models": "Administrar Modelos", "Manage Ollama Models": "Administrar Modelos Ollama", - "Manage Pipelines": "Administrar canalizaciones", - "Manage Valves": "", + "Manage Pipelines": "Administrar Pipelines", + "Manage Valves": "Gestionar Valves", "March": "Marzo", "Max Tokens (num_predict)": "Máximo de fichas (num_predict)", "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Se pueden descargar un máximo de 3 modelos simultáneamente. Por favor, inténtelo de nuevo más tarde.", "May": "Mayo", "Memories accessible by LLMs will be shown here.": "Las memorias accesibles por los LLMs se mostrarán aquí.", "Memory": "Memoria", - "Memory added successfully": "", - "Memory cleared successfully": "", - "Memory deleted successfully": "", - "Memory updated successfully": "", + "Memory added successfully": "Memoria añadida correctamente", + "Memory cleared successfully": "Memoria liberada correctamente", + "Memory deleted successfully": "Memoria borrada correctamente", + "Memory updated successfully": "Memoria actualizada correctamente", "Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "Los mensajes que envíe después de crear su enlace no se compartirán. Los usuarios con el enlace podrán ver el chat compartido.", "Minimum Score": "Puntuación mínima", "Mirostat": "Mirostat", @@ -351,18 +351,18 @@ "Mirostat Tau": "Mirostat Tau", "MMMM DD, YYYY": "MMMM DD, YYYY", "MMMM DD, YYYY HH:mm": "MMMM DD, YYYY HH:mm", - "MMMM DD, YYYY hh:mm:ss A": "", + "MMMM DD, YYYY hh:mm:ss A": "MMMM DD, YYYY hh:mm:ss A", "Model '{{modelName}}' has been successfully downloaded.": "El modelo '{{modelName}}' se ha descargado correctamente.", "Model '{{modelTag}}' is already in queue for downloading.": "El modelo '{{modelTag}}' ya está en cola para descargar.", "Model {{modelId}} not found": "El modelo {{modelId}} no fue encontrado", "Model {{modelName}} is not vision capable": "El modelo {{modelName}} no es capaz de ver", "Model {{name}} is now {{status}}": "El modelo {{name}} ahora es {{status}}", - "Model created successfully!": "", + "Model created successfully!": "Modelo creado correctamente!", "Model filesystem path detected. Model shortname is required for update, cannot continue.": "Se detectó la ruta del sistema de archivos del modelo. Se requiere el nombre corto del modelo para la actualización, no se puede continuar.", "Model ID": "ID del modelo", "Model not selected": "Modelo no seleccionado", "Model Params": "Parámetros del modelo", - "Model updated successfully": "", + "Model updated successfully": "Modelo actualizado correctamente", "Model Whitelisting": "Listado de Modelos habilitados", "Model(s) Whitelisted": "Modelo(s) habilitados", "Modelfile Content": "Contenido del Modelfile", @@ -373,20 +373,20 @@ "Name your model": "Asigne un nombre a su modelo", "New Chat": "Nuevo Chat", "New Password": "Nueva Contraseña", - "No content to speak": "", - "No documents found": "", - "No file selected": "", + "No content to speak": "No hay contenido para hablar", + "No documents found": "No se han encontrado documentos", + "No file selected": "Ningún archivo fué seleccionado", "No results found": "No se han encontrado resultados", "No search query generated": "No se ha generado ninguna consulta de búsqueda", "No source available": "No hay fuente disponible", - "No valves to update": "", + "No valves to update": "No valves para actualizar", "None": "Ninguno", "Not factually correct": "No es correcto en todos los aspectos", "Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "Nota: Si estableces una puntuación mínima, la búsqueda sólo devolverá documentos con una puntuación mayor o igual a la puntuación mínima.", "Notifications": "Notificaciones", "November": "Noviembre", "num_thread (Ollama)": "num_thread (Ollama)", - "OAuth ID": "", + "OAuth ID": "OAuth ID", "October": "Octubre", "Off": "Desactivado", "Okay, Let's Go!": "Bien, ¡Vamos!", @@ -394,16 +394,17 @@ "Ollama": "Ollama", "Ollama API": "Ollama API", "Ollama API disabled": "API de Ollama deshabilitada", - "Ollama API is disabled": "", + "Ollama API is disabled": "API de Ollama desactivada", "Ollama Version": "Versión de Ollama", "On": "Activado", "Only": "Solamente", "Only alphanumeric characters and hyphens are allowed in the command string.": "Sólo se permiten caracteres alfanuméricos y guiones en la cadena de comando.", "Oops! Hold tight! Your files are still in the processing oven. We're cooking them up to perfection. Please be patient and we'll let you know once they're ready.": "¡Ups! ¡Agárrate fuerte! Tus archivos todavía están en el horno de procesamiento. Los estamos cocinando a la perfección. Tenga paciencia y le avisaremos una vez que estén listos.", "Oops! Looks like the URL is invalid. Please double-check and try again.": "¡Ups! Parece que la URL no es válida. Vuelva a verificar e inténtelo nuevamente.", - "Oops! There was an error in the previous response. Please try again or contact admin.": "", + "Oops! There was an error in the previous response. Please try again or contact admin.": "¡Oops! Hubo un error en la respuesta anterior. Intente de nuevo o póngase en contacto con el administrador.", "Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "¡Ups! Estás utilizando un método no compatible (solo frontend). Por favor ejecute la WebUI desde el backend.", "Open": "Abrir", + "Open AI": "Abrir AI", "Open AI (Dall-E)": "Abrir AI (Dall-E)", "Open new chat": "Abrir nuevo chat", "OpenAI": "OpenAI", @@ -417,14 +418,14 @@ "PDF document (.pdf)": "PDF document (.pdf)", "PDF Extract Images (OCR)": "Extraer imágenes de PDF (OCR)", "pending": "pendiente", - "Permission denied when accessing media devices": "", - "Permission denied when accessing microphone": "", + "Permission denied when accessing media devices": "Permiso denegado al acceder a los dispositivos", + "Permission denied when accessing microphone": "Permiso denegado al acceder a la micrófono", "Permission denied when accessing microphone: {{error}}": "Permiso denegado al acceder al micrófono: {{error}}", "Personalization": "Personalización", - "Pipeline deleted successfully": "", - "Pipeline downloaded successfully": "", - "Pipelines": "Tuberías", - "Pipelines Not Detected": "", + "Pipeline deleted successfully": "Pipeline borrada exitosamente", + "Pipeline downloaded successfully": "Pipeline descargada exitosamente", + "Pipelines": "Pipelines", + "Pipelines Not Detected": "Pipeline No Detectada", "Pipelines Valves": "Tuberías Válvulas", "Plain text (.txt)": "Texto plano (.txt)", "Playground": "Patio de juegos", @@ -444,7 +445,7 @@ "Read Aloud": "Leer al oído", "Record voice": "Grabar voz", "Redirecting you to OpenWebUI Community": "Redireccionándote a la comunidad OpenWebUI", - "Refer to yourself as \"User\" (e.g., \"User is learning Spanish\")": "", + "Refer to yourself as \"User\" (e.g., \"User is learning Spanish\")": "Referirse a usted mismo como \"Usuario\" (por ejemplo, \"El usuario está aprendiendo Español\")", "Refused when it shouldn't have": "Rechazado cuando no debería", "Regenerate": "Regenerar", "Release Notes": "Notas de la versión", @@ -456,16 +457,16 @@ "Reranking Model": "Modelo de reranking", "Reranking model disabled": "Modelo de reranking deshabilitado", "Reranking model set to \"{{reranking_model}}\"": "Modelo de reranking establecido en \"{{reranking_model}}\"", - "Reset": "", - "Reset Upload Directory": "", + "Reset": "Reiniciar", + "Reset Upload Directory": "Reiniciar Directorio de carga", "Reset Vector Storage": "Restablecer almacenamiento vectorial", "Response AutoCopy to Clipboard": "Copiar respuesta automáticamente al portapapeles", - "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", + "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "Las notificaciones de respuesta no pueden activarse debido a que los permisos del sitio web han sido denegados. Por favor, visite las configuraciones de su navegador para otorgar el acceso necesario.", "Role": "Rol", "Rosé Pine": "Rosé Pine", "Rosé Pine Dawn": "Rosé Pine Dawn", "RTL": "RTL", - "Running": "", + "Running": "Ejecutando", "Save": "Guardar", "Save & Create": "Guardar y Crear", "Save & Update": "Guardar y Actualizar", @@ -477,40 +478,40 @@ "Search a model": "Buscar un modelo", "Search Chats": "Chats de búsqueda", "Search Documents": "Buscar Documentos", - "Search Functions": "", + "Search Functions": "Funciones de Búsqueda", "Search Models": "Modelos de búsqueda", "Search Prompts": "Buscar Prompts", - "Search Query Generation Prompt": "", - "Search Query Generation Prompt Length Threshold": "", + "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": "", + "Search Tools": "Búsqueda de herramientas", "Searched {{count}} sites_one": "Buscado {{count}} sites_one", "Searched {{count}} sites_many": "Buscado {{count}} sites_many", "Searched {{count}} sites_other": "Buscó {{count}} sites_other", - "Searching \"{{searchQuery}}\"": "", + "Searching \"{{searchQuery}}\"": "Buscando \"{{searchQuery}}\"", "Searxng Query URL": "Searxng URL de consulta", "See readme.md for instructions": "Vea el readme.md para instrucciones", "See what's new": "Ver las novedades", "Seed": "Seed", "Select a base model": "Seleccionar un modelo base", - "Select a engine": "", - "Select a function": "", + "Select a engine": "Busca un motor", + "Select a function": "Busca una función", "Select a mode": "Selecciona un modo", "Select a model": "Selecciona un modelo", - "Select a pipeline": "Selección de una canalización", - "Select a pipeline url": "Selección de una dirección URL de canalización", - "Select a tool": "", + "Select a pipeline": "Selección de una Pipeline", + "Select a pipeline url": "Selección de una dirección URL de Pipeline", + "Select a tool": "Busca una herramienta", "Select an Ollama instance": "Seleccione una instancia de Ollama", - "Select Documents": "", + "Select Documents": "Seleccionar Documentos", "Select model": "Selecciona un modelo", - "Select only one model to call": "", + "Select only one model to call": "Selecciona sólo un modelo para llamar", "Selected model(s) do not support image inputs": "Los modelos seleccionados no admiten entradas de imagen", "Send": "Enviar", "Send a Message": "Enviar un Mensaje", "Send message": "Enviar Mensaje", "September": "Septiembre", "Serper API Key": "Clave API de Serper", - "Serply API Key": "", + "Serply API Key": "Clave API de Serply", "Serpstack API Key": "Clave API de Serpstack", "Server connection verified": "Conexión del servidor verificada", "Set as default": "Establecer por defecto", @@ -522,18 +523,18 @@ "Set Task Model": "Establecer modelo de tarea", "Set Voice": "Establecer la voz", "Settings": "Configuración", - "Settings saved successfully!": "¡Configuración guardada exitosamente!", - "Settings updated successfully": "", + "Settings saved successfully!": "¡Configuración guardada con éxito!", + "Settings updated successfully": "¡Configuración actualizada con éxito!", "Share": "Compartir", "Share Chat": "Compartir Chat", "Share to OpenWebUI Community": "Compartir con la comunidad OpenWebUI", "short-summary": "resumen-corto", "Show": "Mostrar", - "Show Admin Details in Account Pending Overlay": "", - "Show Model": "", + "Show Admin Details in Account Pending Overlay": "Mostrar detalles de administración en la capa de espera de la cuenta", + "Show Model": "Mostrar Modelo", "Show shortcuts": "Mostrar atajos", - "Show your support!": "", - "Showcased creativity": "Mostrar creatividad", + "Show your support!": "¡Muestra tu apoyo!", + "Showcased creativity": "Creatividad mostrada", "sidebar": "barra lateral", "Sign in": "Iniciar sesión", "Sign Out": "Cerrar sesión", @@ -543,7 +544,7 @@ "Speech recognition error: {{error}}": "Error de reconocimiento de voz: {{error}}", "Speech-to-Text Engine": "Motor de voz a texto", "Stop Sequence": "Detener secuencia", - "STT Model": "", + "STT Model": "Modelo STT", "STT Settings": "Configuraciones de STT", "Submit": "Enviar", "Subtitle (e.g. about the Roman Empire)": "Subtítulo (por ejemplo, sobre el Imperio Romano)", @@ -553,8 +554,8 @@ "System": "Sistema", "System Prompt": "Prompt del sistema", "Tags": "Etiquetas", - "Tap to interrupt": "", - "Tavily API Key": "", + "Tap to interrupt": "Toca para interrumpir", + "Tavily API Key": "Clave API de Tavily", "Tell us more:": "Dinos más:", "Temperature": "Temperatura", "Template": "Plantilla", @@ -564,12 +565,12 @@ "Thanks for your feedback!": "¡Gracias por tu retroalimentación!", "The score should be a value between 0.0 (0%) and 1.0 (100%).": "El puntaje debe ser un valor entre 0.0 (0%) y 1.0 (100%).", "Theme": "Tema", - "Thinking...": "", - "This action cannot be undone. Do you wish to continue?": "", + "Thinking...": "Pensando...", + "This action cannot be undone. Do you wish to continue?": "Esta acción no se puede deshacer. ¿Desea continuar?", "This ensures that your valuable conversations are securely saved to your backend database. Thank you!": "Esto garantiza que sus valiosas conversaciones se guarden de forma segura en su base de datos en el backend. ¡Gracias!", - "This is an experimental feature, it may not function as expected and is subject to change at any time.": "", + "This is an experimental feature, it may not function as expected and is subject to change at any time.": "Esta es una característica experimental que puede no funcionar como se esperaba y está sujeto a cambios en cualquier momento.", "This setting does not sync across browsers or devices.": "Esta configuración no se sincroniza entre navegadores o dispositivos.", - "This will delete": "", + "This will delete": "Esto eliminará", "Thorough explanation": "Explicación exhaustiva", "Tip: Update multiple variable slots consecutively by pressing the tab key in the chat input after each replacement.": "Consejo: Actualice múltiples variables consecutivamente presionando la tecla tab en la entrada del chat después de cada reemplazo.", "Title": "Título", @@ -580,39 +581,39 @@ "to": "para", "To access the available model names for downloading,": "Para acceder a los nombres de modelos disponibles para descargar,", "To access the GGUF models available for downloading,": "Para acceder a los modelos GGUF disponibles para descargar,", - "To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.": "", - "To add documents here, upload them to the \"Documents\" workspace first.": "", + "To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.": "Para acceder al interfaz de usuario web, por favor contacte al administrador. Los administradores pueden administrar los estados de los usuarios desde el panel de administración.", + "To add documents here, upload them to the \"Documents\" workspace first.": "Para agregar documentos aquí, subalos al área de trabajo \"Documentos\" primero.", "to chat input.": "a la entrada del chat.", - "To select filters here, add them to the \"Functions\" workspace first.": "", - "To select toolkits here, add them to the \"Tools\" workspace first.": "", + "To select filters here, add them to the \"Functions\" workspace first.": "Para seleccionar filtros aquí, agreguelos al área de trabajo \"Funciones\" primero.", + "To select toolkits here, add them to the \"Tools\" workspace first.": "Para seleccionar herramientas aquí, agreguelas al área de trabajo \"Herramientas\" primero.", "Today": "Hoy", "Toggle settings": "Alternar configuración", "Toggle sidebar": "Alternar barra lateral", - "Tokens To Keep On Context Refresh (num_keep)": "", - "Tool created successfully": "", - "Tool deleted successfully": "", - "Tool imported successfully": "", - "Tool updated successfully": "", - "Tools": "", + "Tokens To Keep On Context Refresh (num_keep)": "Tokens a mantener en el contexto de actualización (num_keep)", + "Tool created successfully": "Herramienta creada con éxito", + "Tool deleted successfully": "Herramienta eliminada con éxito", + "Tool imported successfully": "Herramienta importada con éxito", + "Tool updated successfully": "Herramienta actualizada con éxito", + "Tools": "Herramientas", "Top K": "Top K", "Top P": "Top P", "Trouble accessing Ollama?": "¿Problemas para acceder a Ollama?", - "TTS Model": "", + "TTS Model": "Modelo TTS", "TTS Settings": "Configuración de TTS", - "TTS Voice": "", + "TTS Voice": "Voz del TTS", "Type": "Tipo", "Type Hugging Face Resolve (Download) URL": "Escriba la URL (Descarga) de Hugging Face Resolve", "Uh-oh! There was an issue connecting to {{provider}}.": "¡Uh oh! Hubo un problema al conectarse a {{provider}}.", - "UI": "", - "Unknown file type '{{file_type}}'. Proceeding with the file upload anyway.": "", - "Update": "", + "UI": "UI", + "Unknown file type '{{file_type}}'. Proceeding with the file upload anyway.": "Tipo de archivo desconocido '{{file_type}}'. Procediendo con la carga del archivo de todos modos.", + "Update": "Actualizar", "Update and Copy Link": "Actualizar y copiar enlace", "Update password": "Actualizar contraseña", - "Updated at": "", - "Upload": "", + "Updated at": "Actualizado en", + "Upload": "Subir", "Upload a GGUF model": "Subir un modelo GGUF", "Upload Files": "Subir archivos", - "Upload Pipeline": "", + "Upload Pipeline": "Subir Pipeline", "Upload Progress": "Progreso de carga", "URL Mode": "Modo de URL", "Use '#' in the prompt input to load and select your documents.": "Utilice '#' en el prompt para cargar y seleccionar sus documentos.", @@ -621,22 +622,22 @@ "use_mlock (Ollama)": "use_mlock (Ollama)", "use_mmap (Ollama)": "use_mmap (Ollama)", "user": "usuario", - "User location successfully retrieved.": "", + "User location successfully retrieved.": "Localización del usuario recuperada con éxito.", "User Permissions": "Permisos de usuario", "Users": "Usuarios", "Utilize": "Utilizar", "Valid time units:": "Unidades válidas de tiempo:", - "Valves": "", - "Valves updated": "", - "Valves updated successfully": "", + "Valves": "Valves", + "Valves updated": "Valves actualizados", + "Valves updated successfully": "Valves actualizados con éxito", "variable": "variable", "variable to have them replaced with clipboard content.": "variable para reemplazarlos con el contenido del portapapeles.", "Version": "Versión", - "Voice": "", + "Voice": "Voz", "Warning": "Advertencia", "Warning: If you update or change your embedding model, you will need to re-import all documents.": "Advertencia: Si actualiza o cambia su modelo de inserción, necesitará volver a importar todos los documentos.", "Web": "Web", - "Web API": "", + "Web API": "API Web", "Web Loader Settings": "Web Loader Settings", "Web Params": "Web Params", "Web Search": "Búsqueda en la Web", @@ -646,14 +647,14 @@ "WebUI will make requests to": "WebUI realizará solicitudes a", "What’s New in": "Novedades en", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "Cuando el historial está desactivado, los nuevos chats en este navegador no aparecerán en el historial de ninguno de sus dispositivos..", - "Whisper (Local)": "", - "Widescreen Mode": "", + "Whisper (Local)": "Whisper (Local)", + "Widescreen Mode": "Modo de pantalla ancha", "Workspace": "Espacio de trabajo", "Write a prompt suggestion (e.g. Who are you?)": "Escribe una sugerencia para un prompt (por ejemplo, ¿quién eres?)", "Write a summary in 50 words that summarizes [topic or keyword].": "Escribe un resumen en 50 palabras que resuma [tema o palabra clave].", "Yesterday": "Ayer", "You": "Usted", - "You can personalize your interactions with LLMs by adding memories through the 'Manage' button below, making them more helpful and tailored to you.": "", + "You can personalize your interactions with LLMs by adding memories through the 'Manage' button below, making them more helpful and tailored to you.": "Puede personalizar sus interacciones con LLMs añadiendo memorias a través del botón 'Gestionar' debajo, haciendo que sean más útiles y personalizados para usted.", "You cannot clone a base model": "No se puede clonar un modelo base", "You have no archived conversations.": "No tiene conversaciones archivadas.", "You have shared this chat": "Usted ha compartido esta conversación", From b59684328d8f510b9e144a6ddb6f89cfb95516e0 Mon Sep 17 00:00:00 2001 From: Karl Lee <61072264+KarlLee830@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:59:43 +0800 Subject: [PATCH 05/17] i18n: Update Chinese translation --- src/lib/i18n/locales/zh-CN/translation.json | 102 ++++++++++---------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index 2a3a397de..36ea2b271 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -18,7 +18,7 @@ "Active Users": "当前在线用户", "Add": "添加", "Add a model id": "添加一个模型 ID", - "Add a short description about what this model does": "添加有关该模型功能的简短描述", + "Add a short description about what this model does": "添加有关该模型能力的简短描述", "Add a short title for this prompt": "为此提示词添加一个简短的标题", "Add a tag": "添加标签", "Add custom prompt": "添加自定义提示词", @@ -44,7 +44,7 @@ "Allow Chat Deletion": "允许删除聊天记录", "Allow non-local voices": "允许调用非本地音色", "Allow User Location": "允许获取您的位置", - "Allow Voice Interruption in Call": "", + "Allow Voice Interruption in Call": "允许通话中的打断语音", "alphanumeric characters and hyphens": "字母数字字符和连字符", "Already have an account?": "已经拥有账号了?", "an assistant": "助手", @@ -63,7 +63,7 @@ "Attach file": "添加文件", "Attention to detail": "注重细节", "Audio": "语音", - "Audio settings updated successfully": "", + "Audio settings updated successfully": "语音设置更新成功", "August": "八月", "Auto-playback response": "自动念出回复内容", "AUTOMATIC1111 Api Auth String": "AUTOMATIC1111 Api鉴权字符串", @@ -110,10 +110,10 @@ "Click here to select documents.": "单击选择文档", "click here.": "点击这里。", "Click on the user role button to change a user's role.": "点击角色前方的组别按钮以更改用户所属权限组。", - "Clipboard write permission denied. Please check your browser settings to grant the necessary access.": "", + "Clipboard write permission denied. Please check your browser settings to grant the necessary access.": "写入剪贴板时被拒绝。请检查浏览器设置,授予必要权限。", "Clone": "复制", "Close": "关闭", - "Code formatted successfully": "", + "Code formatted successfully": "代码格式化成功", "Collection": "集合", "ComfyUI": "ComfyUI", "ComfyUI Base URL": "ComfyUI 基础地址", @@ -128,7 +128,7 @@ "Content": "内容", "Context Length": "上下文长度", "Continue Response": "继续生成", - "Continue with {{provider}}": "", + "Continue with {{provider}}": "使用 {{provider}} 继续", "Copied shared chat URL to clipboard!": "已复制此对话分享链接至剪贴板!", "Copy": "复制", "Copy last code block": "复制最后一个代码块中的代码", @@ -165,22 +165,22 @@ "Delete chat": "删除对话记录", "Delete Chat": "删除对话记录", "Delete chat?": "删除对话记录?", - "Delete function?": "", - "Delete prompt?": "", + "Delete function?": "删除函数?", + "Delete prompt?": "删除提示词?", "delete this link": "此处删除这个链接", - "Delete tool?": "", + "Delete tool?": "删除工具?", "Delete User": "删除用户", "Deleted {{deleteModelTag}}": "已删除 {{deleteModelTag}}", "Deleted {{name}}": "已删除 {{name}}", "Description": "描述", "Didn't fully follow instructions": "没有完全遵照指示", - "Discover a function": "", + "Discover a function": "发现更多函数", "Discover a model": "发现更多模型", "Discover a prompt": "发现更多提示词", - "Discover a tool": "", - "Discover, download, and explore custom functions": "", + "Discover a tool": "发现更多工具", + "Discover, download, and explore custom functions": "发现、下载并探索更多函数", "Discover, download, and explore custom prompts": "发现、下载并探索更多自定义提示词", - "Discover, download, and explore custom tools": "", + "Discover, download, and explore custom tools": "发现、下载并探索更多工具", "Discover, download, and explore model presets": "发现、下载并探索更多模型预设", "Dismissible": "是否可关闭", "Display Emoji in Call": "在通话中显示 Emoji 表情符号", @@ -193,7 +193,7 @@ "Don't Allow": "不允许", "Don't have an account?": "没有账号?", "Don't like the style": "不喜欢这个文风", - "Done": "", + "Done": "完成", "Download": "下载", "Download canceled": "下载已取消", "Download Database": "下载数据库", @@ -247,8 +247,8 @@ "Export chat (.json)": "JSON 文件 (.json)", "Export Chats": "导出对话", "Export Documents Mapping": "导出文档映射", - "Export Functions": "导出功能", - "Export LiteLLM config.yaml": "", + "Export Functions": "导出函数", + "Export LiteLLM config.yaml": "导出 LteLLM config.yaml 文件", "Export Models": "导出模型", "Export Prompts": "导出提示词", "Export Tools": "导出工具", @@ -269,11 +269,11 @@ "Form": "手动创建", "Format your variables using square brackets like this:": "使用这样的方括号格式化你的变量:", "Frequency Penalty": "频率惩罚", - "Function created successfully": "", - "Function deleted successfully": "", - "Function updated successfully": "", - "Functions": "功能", - "Functions imported successfully": "", + "Function created successfully": "函数创建成功", + "Function deleted successfully": "函数删除成功", + "Function updated successfully": "函数更新成功", + "Functions": "函数", + "Functions imported successfully": "函数导入成功", "General": "通用", "General Settings": "通用设置", "Generate Image": "生成图像", @@ -296,7 +296,7 @@ "Images": "图像", "Import Chats": "导入对话记录", "Import Documents Mapping": "导入文档映射", - "Import Functions": "导入功能", + "Import Functions": "导入函数", "Import Models": "导入模型", "Import Prompts": "导入提示词", "Import Tools": "导入工具", @@ -333,17 +333,17 @@ "Manage Models": "管理模型", "Manage Ollama Models": "管理 Ollama 模型", "Manage Pipelines": "管理 Pipeline", - "Manage Valves": "", + "Manage Valves": "管理值", "March": "三月", "Max Tokens (num_predict)": "最多 Token (num_predict)", "Maximum of 3 models can be downloaded simultaneously. Please try again later.": "最多可以同时下载 3 个模型,请稍后重试。", "May": "五月", "Memories accessible by LLMs will be shown here.": "大语言模型可访问的记忆将在此显示。", "Memory": "记忆", - "Memory added successfully": "", - "Memory cleared successfully": "", - "Memory deleted successfully": "", - "Memory updated successfully": "", + "Memory added successfully": "记忆添加成功", + "Memory cleared successfully": "记忆清除成功", + "Memory deleted successfully": "记忆删除成功", + "Memory updated successfully": "记忆更新成功", "Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "创建链接后发送的消息不会被共享。具有 URL 的用户将能够查看共享对话。", "Minimum Score": "最低分", "Mirostat": "Mirostat", @@ -355,14 +355,14 @@ "Model '{{modelName}}' has been successfully downloaded.": "模型'{{modelName}}'已成功下载。", "Model '{{modelTag}}' is already in queue for downloading.": "模型'{{modelTag}}'已在下载队列中。", "Model {{modelId}} not found": "未找到模型 {{modelId}}", - "Model {{modelName}} is not vision capable": "模型 {{modelName}} 不支持视觉功能", + "Model {{modelName}} is not vision capable": "模型 {{modelName}} 不支持视觉能力", "Model {{name}} is now {{status}}": "模型 {{name}} 现在是 {{status}}", - "Model created successfully!": "", + "Model created successfully!": "模型创建成功!", "Model filesystem path detected. Model shortname is required for update, cannot continue.": "检测到模型文件系统路径,无法继续进行。更新操作需要提供模型简称。", "Model ID": "模型 ID", "Model not selected": "未选择模型", "Model Params": "模型参数", - "Model updated successfully": "", + "Model updated successfully": "模型更新成功", "Model Whitelisting": "白名单模型", "Model(s) Whitelisted": "模型已加入白名单", "Modelfile Content": "模型文件内容", @@ -373,20 +373,20 @@ "Name your model": "为您的模型命名", "New Chat": "新对话", "New Password": "新密码", - "No content to speak": "", + "No content to speak": "没有内容可朗读", "No documents found": "未找到文档", - "No file selected": "", + "No file selected": "未选中文件", "No results found": "未找到结果", "No search query generated": "未生成搜索查询", "No source available": "没有可用来源", - "No valves to update": "", + "No valves to update": "没有需要更新的值", "None": "无", "Not factually correct": "事实并非如此", "Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "注意:如果设置了最低分数,搜索只会返回分数大于或等于最低分数的文档。", "Notifications": "桌面通知", "November": "十一月", "num_thread (Ollama)": "num_thread(Ollama)", - "OAuth ID": "", + "OAuth ID": "OAuth ID", "October": "十月", "Off": "关闭", "Okay, Let's Go!": "确认,开始使用!", @@ -421,10 +421,10 @@ "Permission denied when accessing microphone": "申请麦克风权限被拒绝", "Permission denied when accessing microphone: {{error}}": "申请麦克风权限被拒绝:{{error}}", "Personalization": "个性化", - "Pipeline deleted successfully": "", - "Pipeline downloaded successfully": "", + "Pipeline deleted successfully": "Pipeline 删除成功", + "Pipeline downloaded successfully": "Pipeline 下载成功", "Pipelines": "Pipeline", - "Pipelines Not Detected": "", + "Pipelines Not Detected": "未检测到 Pipeline", "Pipelines Valves": "Pipeline 值", "Plain text (.txt)": "TXT 文档 (.txt)", "Playground": "AI 对话游乐场", @@ -460,7 +460,7 @@ "Reset Upload Directory": "重置上传目录", "Reset Vector Storage": "重置向量存储", "Response AutoCopy to Clipboard": "自动复制回复到剪贴板", - "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "", + "Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "无法激活回复时发送通知。请检查浏览器设置,并授予必要的访问权限。", "Role": "权限组", "Rosé Pine": "Rosé Pine", "Rosé Pine Dawn": "Rosé Pine Dawn", @@ -477,7 +477,7 @@ "Search a model": "搜索模型", "Search Chats": "搜索对话", "Search Documents": "搜索文档", - "Search Functions": "搜索功能", + "Search Functions": "搜索函数", "Search Models": "搜索模型", "Search Prompts": "搜索提示词", "Search Query Generation Prompt": "搜索查询生成提示", @@ -492,12 +492,12 @@ "Seed": "种子 (Seed)", "Select a base model": "选择一个基础模型", "Select a engine": "选择一个搜索引擎", - "Select a function": "", + "Select a function": "选择一个函数", "Select a mode": "选择一个模式", "Select a model": "选择一个模型", "Select a pipeline": "选择一个管道", "Select a pipeline url": "选择一个管道 URL", - "Select a tool": "", + "Select a tool": "选择一个工具", "Select an Ollama instance": "选择一个 Ollama 实例", "Select Documents": "选择文档", "Select model": "选择模型", @@ -530,7 +530,7 @@ "Show Admin Details in Account Pending Overlay": "在用户待激活界面中显示管理员邮箱等详细信息", "Show Model": "显示", "Show shortcuts": "显示快捷方式", - "Show your support!": "", + "Show your support!": "表达你的支持!", "Showcased creativity": "很有创意", "sidebar": "侧边栏", "Sign in": "登录", @@ -581,16 +581,16 @@ "To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.": "请联系管理员以访问。管理员可以在后台管理面板中管理用户状态。", "To add documents here, upload them to the \"Documents\" workspace first.": "要在此处添加文档,请先将它们上传到工作空间中的“文档”内。", "to chat input.": "到对话输入。", - "To select filters here, add them to the \"Functions\" workspace first.": "要在这里选择过滤器,请先将它们添加到工作空间中的“功能”。", + "To select filters here, add them to the \"Functions\" workspace first.": "要在这里选择过滤器,请先将它们添加到工作空间中的“函数”。", "To select toolkits here, add them to the \"Tools\" workspace first.": "要在这里选择工具包,请先将它们添加到工作空间中的“工具”。", "Today": "今天", "Toggle settings": "切换设置", "Toggle sidebar": "切换侧边栏", "Tokens To Keep On Context Refresh (num_keep)": "在语境刷新时需保留的 Tokens", - "Tool created successfully": "", - "Tool deleted successfully": "", - "Tool imported successfully": "", - "Tool updated successfully": "", + "Tool created successfully": "工具创建成功", + "Tool deleted successfully": "工具删除成功", + "Tool imported successfully": "工具导入成功", + "Tool updated successfully": "工具更新成功", "Tools": "工具", "Top K": "Top K", "Top P": "Top P", @@ -619,14 +619,14 @@ "use_mlock (Ollama)": "use_mlock(Ollama)", "use_mmap (Ollama)": "use_mmap (Ollama)", "user": "用户", - "User location successfully retrieved.": "", + "User location successfully retrieved.": "成功检索到用户位置。", "User Permissions": "用户权限", "Users": "用户", "Utilize": "利用", "Valid time units:": "有效时间单位:", - "Valves": "", - "Valves updated": "", - "Valves updated successfully": "", + "Valves": "值", + "Valves updated": "已更新值", + "Valves updated successfully": "值更新成功", "variable": "变量", "variable to have them replaced with clipboard content.": "变量将被剪贴板内容替换。", "Version": "版本", From c07da8d1f3ddbad652af8bd2acf7202def39bc23 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 27 Jun 2024 10:56:00 -0700 Subject: [PATCH 06/17] chore: format --- src/lib/i18n/locales/es-ES/translation.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/i18n/locales/es-ES/translation.json b/src/lib/i18n/locales/es-ES/translation.json index cf8d7fb87..0f9565d25 100644 --- a/src/lib/i18n/locales/es-ES/translation.json +++ b/src/lib/i18n/locales/es-ES/translation.json @@ -404,7 +404,6 @@ "Oops! There was an error in the previous response. Please try again or contact admin.": "¡Oops! Hubo un error en la respuesta anterior. Intente de nuevo o póngase en contacto con el administrador.", "Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "¡Ups! Estás utilizando un método no compatible (solo frontend). Por favor ejecute la WebUI desde el backend.", "Open": "Abrir", - "Open AI": "Abrir AI", "Open AI (Dall-E)": "Abrir AI (Dall-E)", "Open new chat": "Abrir nuevo chat", "OpenAI": "OpenAI", From 3c7f45ced446e6702ff62e40c2569eef61f5df7f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 27 Jun 2024 11:12:07 -0700 Subject: [PATCH 07/17] fix --- src/lib/components/admin/Settings/Connections.svelte | 5 ++++- src/lib/components/common/SensitiveInput.svelte | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/components/admin/Settings/Connections.svelte b/src/lib/components/admin/Settings/Connections.svelte index 9f81bc639..b11e1760e 100644 --- a/src/lib/components/admin/Settings/Connections.svelte +++ b/src/lib/components/admin/Settings/Connections.svelte @@ -230,7 +230,10 @@ {/if} - +
{#if idx === 0}
diff --git a/src/routes/(app)/workspace/models/create/+page.svelte b/src/routes/(app)/workspace/models/create/+page.svelte index 479e83cee..6534fb49c 100644 --- a/src/routes/(app)/workspace/models/create/+page.svelte +++ b/src/routes/(app)/workspace/models/create/+page.svelte @@ -2,7 +2,7 @@ import { v4 as uuidv4 } from 'uuid'; import { toast } from 'svelte-sonner'; import { goto } from '$app/navigation'; - import { settings, user, config, models, tools } from '$lib/stores'; + import { settings, user, config, models, tools, functions } from '$lib/stores'; import TurndownService from 'turndown'; @@ -17,6 +17,7 @@ import ToolsSelector from '$lib/components/workspace/Models/ToolsSelector.svelte'; import { stringify } from 'postcss'; import { parseFile } from '$lib/utils/characters'; + import FiltersSelector from '$lib/components/workspace/Models/FiltersSelector.svelte'; const i18n = getContext('i18n'); @@ -61,6 +62,7 @@ let toolIds = []; let knowledge = []; + let filterIds = []; $: if (name) { id = name @@ -105,6 +107,14 @@ } } + if (filterIds.length > 0) { + info.meta.filterIds = filterIds; + } else { + if (info.meta.filterIds) { + delete info.meta.filterIds; + } + } + info.params.stop = params.stop ? params.stop.split(',').filter((s) => s.trim()) : null; Object.keys(info.params).forEach((key) => { if (info.params[key] === '' || info.params[key] === null) { @@ -173,6 +183,10 @@ capabilities = { ...capabilities, ...(model?.info?.meta?.capabilities ?? {}) }; toolIds = model?.info?.meta?.toolIds ?? []; + if (model?.info?.meta?.filterIds) { + filterIds = [...model?.info?.meta?.filterIds]; + } + info = { ...info, ...model.info @@ -604,6 +618,13 @@ +
+ func.type === 'filter')} + /> +
+
{$i18n.t('Capabilities')}
From edbd07f893dcf6fdd996a098a74264f106e4129f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 27 Jun 2024 13:04:12 -0700 Subject: [PATCH 11/17] feat: global filter --- .../migrations/018_add_function_is_global.py | 49 +++++++++++++++++++ backend/apps/webui/models/functions.py | 13 +++++ backend/apps/webui/routers/functions.py | 27 ++++++++++ backend/main.py | 49 +++++++++---------- src/lib/apis/functions/index.ts | 32 ++++++++++++ src/lib/components/icons/GlobeAlt.svelte | 19 +++++++ src/lib/components/workspace/Functions.svelte | 25 +++++++++- .../workspace/Functions/FunctionMenu.svelte | 27 ++++++++-- 8 files changed, 212 insertions(+), 29 deletions(-) create mode 100644 backend/apps/webui/internal/migrations/018_add_function_is_global.py create mode 100644 src/lib/components/icons/GlobeAlt.svelte diff --git a/backend/apps/webui/internal/migrations/018_add_function_is_global.py b/backend/apps/webui/internal/migrations/018_add_function_is_global.py new file mode 100644 index 000000000..04cdab705 --- /dev/null +++ b/backend/apps/webui/internal/migrations/018_add_function_is_global.py @@ -0,0 +1,49 @@ +"""Peewee migrations -- 017_add_user_oauth_sub.py. + +Some examples (model - class or model name):: + + > Model = migrator.orm['table_name'] # Return model in current state by name + > Model = migrator.ModelClass # Return model in current state by name + + > migrator.sql(sql) # Run custom SQL + > migrator.run(func, *args, **kwargs) # Run python function with the given args + > migrator.create_model(Model) # Create a model (could be used as decorator) + > migrator.remove_model(model, cascade=True) # Remove a model + > migrator.add_fields(model, **fields) # Add fields to a model + > migrator.change_fields(model, **fields) # Change fields + > migrator.remove_fields(model, *field_names, cascade=True) + > migrator.rename_field(model, old_field_name, new_field_name) + > migrator.rename_table(model, new_table_name) + > migrator.add_index(model, *col_names, unique=False) + > migrator.add_not_null(model, *field_names) + > migrator.add_default(model, field_name, default) + > migrator.add_constraint(model, name, sql) + > migrator.drop_index(model, *col_names) + > migrator.drop_not_null(model, *field_names) + > migrator.drop_constraints(model, *constraints) + +""" + +from contextlib import suppress + +import peewee as pw +from peewee_migrate import Migrator + + +with suppress(ImportError): + import playhouse.postgres_ext as pw_pext + + +def migrate(migrator: Migrator, database: pw.Database, *, fake=False): + """Write your migrations here.""" + + migrator.add_fields( + "function", + is_global=pw.BooleanField(default=False), + ) + + +def rollback(migrator: Migrator, database: pw.Database, *, fake=False): + """Write your rollback migrations here.""" + + migrator.remove_fields("function", "is_global") diff --git a/backend/apps/webui/models/functions.py b/backend/apps/webui/models/functions.py index 261987981..2cace54c4 100644 --- a/backend/apps/webui/models/functions.py +++ b/backend/apps/webui/models/functions.py @@ -30,6 +30,7 @@ class Function(Model): meta = JSONField() valves = JSONField() is_active = BooleanField(default=False) + is_global = BooleanField(default=False) updated_at = BigIntegerField() created_at = BigIntegerField() @@ -50,6 +51,7 @@ class FunctionModel(BaseModel): content: str meta: FunctionMeta is_active: bool = False + is_global: bool = False updated_at: int # timestamp in epoch created_at: int # timestamp in epoch @@ -66,6 +68,7 @@ class FunctionResponse(BaseModel): name: str meta: FunctionMeta is_active: bool + is_global: bool updated_at: int # timestamp in epoch created_at: int # timestamp in epoch @@ -144,6 +147,16 @@ class FunctionsTable: for function in Function.select().where(Function.type == type) ] + def get_global_filter_functions(self) -> List[FunctionModel]: + return [ + FunctionModel(**model_to_dict(function)) + for function in Function.select().where( + Function.type == "filter", + Function.is_active == True, + Function.is_global == True, + ) + ] + def get_function_valves_by_id(self, id: str) -> Optional[dict]: try: function = Function.get(Function.id == id) diff --git a/backend/apps/webui/routers/functions.py b/backend/apps/webui/routers/functions.py index 4c89ca487..f01133a35 100644 --- a/backend/apps/webui/routers/functions.py +++ b/backend/apps/webui/routers/functions.py @@ -147,6 +147,33 @@ async def toggle_function_by_id(id: str, user=Depends(get_admin_user)): ) +############################ +# ToggleGlobalById +############################ + + +@router.post("/id/{id}/toggle/global", response_model=Optional[FunctionModel]) +async def toggle_global_by_id(id: str, user=Depends(get_admin_user)): + function = Functions.get_function_by_id(id) + if function: + function = Functions.update_function_by_id( + id, {"is_global": not function.is_global} + ) + + if function: + return function + else: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=ERROR_MESSAGES.DEFAULT("Error updating function"), + ) + else: + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail=ERROR_MESSAGES.NOT_FOUND, + ) + + ############################ # UpdateFunctionById ############################ diff --git a/backend/main.py b/backend/main.py index d0e85ddda..aae305c5e 100644 --- a/backend/main.py +++ b/backend/main.py @@ -416,21 +416,23 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware): ) return 0 - filter_ids = [] + filter_ids = [ + function.id for function in Functions.get_global_filter_functions() + ] if "info" in model and "meta" in model["info"]: - enabled_filter_ids = [ - function.id - for function in Functions.get_functions_by_type( - "filter", active_only=True - ) - ] - filter_ids = [ - filter_id - for filter_id in enabled_filter_ids - if filter_id in model["info"]["meta"].get("filterIds", []) - ] + filter_ids.extend(model["info"]["meta"].get("filterIds", [])) filter_ids = list(set(filter_ids)) + enabled_filter_ids = [ + function.id + for function in Functions.get_functions_by_type( + "filter", active_only=True + ) + ] + filter_ids = [ + filter_id for filter_id in filter_ids if filter_id in enabled_filter_ids + ] + filter_ids.sort(key=get_priority) for filter_id in filter_ids: filter = Functions.get_function_by_id(filter_id) @@ -919,7 +921,6 @@ async def generate_chat_completions(form_data: dict, user=Depends(get_verified_u ) model = app.state.MODELS[model_id] - print(model) pipe = model.get("pipe") if pipe: @@ -1010,21 +1011,19 @@ async def chat_completed(form_data: dict, user=Depends(get_verified_user)): return (function.valves if function.valves else {}).get("priority", 0) return 0 - filter_ids = [] + filter_ids = [function.id for function in Functions.get_global_filter_functions()] if "info" in model and "meta" in model["info"]: - enabled_filter_ids = [ - function.id - for function in Functions.get_functions_by_type( - "filter", active_only=True - ) - ] - filter_ids = [ - filter_id - for filter_id in enabled_filter_ids - if filter_id in model["info"]["meta"].get("filterIds", []) - ] + filter_ids.extend(model["info"]["meta"].get("filterIds", [])) filter_ids = list(set(filter_ids)) + enabled_filter_ids = [ + function.id + for function in Functions.get_functions_by_type("filter", active_only=True) + ] + filter_ids = [ + filter_id for filter_id in filter_ids if filter_id in enabled_filter_ids + ] + # Sort filter_ids by priority, using the get_priority function filter_ids.sort(key=get_priority) diff --git a/src/lib/apis/functions/index.ts b/src/lib/apis/functions/index.ts index 2d5ad16b7..ed3306b32 100644 --- a/src/lib/apis/functions/index.ts +++ b/src/lib/apis/functions/index.ts @@ -224,6 +224,38 @@ export const toggleFunctionById = async (token: string, id: string) => { return res; }; +export const toggleGlobalById = async (token: string, id: string) => { + let error = null; + + const res = await fetch(`${WEBUI_API_BASE_URL}/functions/id/${id}/toggle/global`, { + method: 'POST', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + authorization: `Bearer ${token}` + } + }) + .then(async (res) => { + if (!res.ok) throw await res.json(); + return res.json(); + }) + .then((json) => { + return json; + }) + .catch((err) => { + error = err.detail; + + console.log(err); + return null; + }); + + if (error) { + throw error; + } + + return res; +}; + export const getFunctionValvesById = async (token: string, id: string) => { let error = null; diff --git a/src/lib/components/icons/GlobeAlt.svelte b/src/lib/components/icons/GlobeAlt.svelte new file mode 100644 index 000000000..d2f86f438 --- /dev/null +++ b/src/lib/components/icons/GlobeAlt.svelte @@ -0,0 +1,19 @@ + + + + + diff --git a/src/lib/components/workspace/Functions.svelte b/src/lib/components/workspace/Functions.svelte index 8a8f88812..8c6389711 100644 --- a/src/lib/components/workspace/Functions.svelte +++ b/src/lib/components/workspace/Functions.svelte @@ -14,7 +14,8 @@ exportFunctions, getFunctionById, getFunctions, - toggleFunctionById + toggleFunctionById, + toggleGlobalById } from '$lib/apis/functions'; import ArrowDownTray from '../icons/ArrowDownTray.svelte'; @@ -113,6 +114,22 @@ models.set(await getModels(localStorage.token)); } }; + + const toggleGlobalHandler = async (func) => { + const res = await toggleGlobalById(localStorage.token, func.id).catch((error) => { + toast.error(error); + }); + + if (res) { + if (func.is_global) { + toast.success($i18n.t('Filter is now globally enabled')); + } else { + toast.success($i18n.t('Filter is now globally disabled')); + } + + functions.set(await getFunctions(localStorage.token)); + } + }; @@ -259,6 +276,7 @@ { goto(`/workspace/functions/edit?id=${encodeURIComponent(func.id)}`); }} @@ -275,6 +293,11 @@ selectedFunction = func; showDeleteConfirm = true; }} + toggleGlobalHandler={() => { + if (func.type === 'filter') { + toggleGlobalHandler(func); + } + }} onClose={() => {}} >