Compare commits

..

27 Commits

Author SHA1 Message Date
Timothy Jaeryang Baek ba20c71963 Merge pull request #5661 from open-webui/dev
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
0.3.27
2024-09-24 18:13:08 +02:00
Timothy J. Baek 7bbc57f225 doc: changelog 2024-09-24 18:12:47 +02:00
Timothy J. Baek e703e172e2 chore: format 2024-09-24 18:10:14 +02:00
Timothy Jaeryang Baek 3ff52fd1ad Merge pull request #5655 from sp301415/dev
fix: Fix KaTeX Rendering
2024-09-24 17:44:08 +02:00
Timothy J. Baek e19406cdd7 fix 2024-09-24 17:43:43 +02:00
Hwang In Tak 30e65b33f6 fix: Add comments 2024-09-25 00:41:08 +09:00
Hwang In Tak 3f1255b39e fix: Change inline and block delimiters 2024-09-25 00:10:49 +09:00
Timothy J. Baek 71743b25fe chore: format 2024-09-24 16:42:42 +02:00
Timothy Jaeryang Baek c7e93b32c5 Merge pull request #5660 from open-webui/pypi-release
fix: open-webui serve
2024-09-24 16:36:37 +02:00
Timothy J. Baek 3cee507687 fix: dev2 2024-09-24 16:19:24 +02:00
Timothy J. Baek ff651ddc36 fix: dev1 2024-09-24 16:07:49 +02:00
Timothy Jaeryang Baek c0738cef26 Merge pull request #5659 from open-webui/dev
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
0.3.26
2024-09-24 15:41:42 +02:00
Timothy J. Baek a44e9a8dda refac 2024-09-24 15:41:23 +02:00
Timothy J. Baek 38b9a63fa5 refac 2024-09-24 15:40:37 +02:00
Timothy J. Baek 2d60e42258 doc: changelog 2024-09-24 15:40:01 +02:00
Timothy Jaeryang Baek 60ac69eb27 Merge pull request #5656 from OriginalSimon/dev
i18n: Update Ukrainian translation
2024-09-24 15:33:15 +02:00
Timothy J. Baek 504d910557 fix: no running event loop issue 2024-09-24 15:31:55 +02:00
Hwang In Tak e48d66f918 fix: Remove unnecessary logging 2024-09-24 22:11:05 +09:00
Hwang In Tak 0bfbace9aa fix: Simplify regex 2024-09-24 22:00:01 +09:00
Timothy Jaeryang Baek 019cf8199f Merge pull request #5657 from open-webui/dev
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
0.3.25
2024-09-24 14:07:23 +02:00
Timothy J. Baek c5f85eed92 doc: changelog 2024-09-24 14:07:13 +02:00
Timothy J. Baek 21719ccdf1 chore: format 2024-09-24 14:05:44 +02:00
Timothy J. Baek 299b3d72cf fix: rate responses 2024-09-24 14:02:41 +02:00
Timothy J. Baek 85e9e231ed fix: image generation 2024-09-24 13:54:34 +02:00
Simon f382a78e31 Update translation.json 2024-09-24 13:47:51 +02:00
Hwang In Tak 377cc427b6 fix: Remove unnecessary logging 2024-09-24 20:40:50 +09:00
Hwang In Tak 214546399a fix: fix katex rendering 2024-09-24 16:58:15 +09:00
51 changed files with 192 additions and 129 deletions
+20
View File
@@ -5,6 +5,26 @@ 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.27] - 2024-09-24
### Fixed
- **🔄 Periodic Cleanup Error Resolved**: Fixed a critical RuntimeError related to the 'periodic_usage_pool_cleanup' coroutine, ensuring smooth and efficient performance post-pip install, correcting a persisting issue from version 0.3.26.
- **📊 Enhanced LaTeX Rendering**: Improved rendering for LaTeX content, enhancing clarity and visual presentation in documents and mathematical models.
## [0.3.26] - 2024-09-24
### Fixed
- **🔄 Event Loop Error Resolution**: Addressed a critical error where a missing running event loop caused 'periodic_usage_pool_cleanup' to fail with pip installs. This fix ensures smoother and more reliable updates and installations, enhancing overall system stability.
## [0.3.25] - 2024-09-24
### Fixed
- **🖼️ Image Generation Functionality**: Resolved an issue where image generation was not functioning, restoring full capability for visual content creation.
- **⚖️ Rate Response Corrections**: Addressed a problem where rate responses were not working, ensuring reliable feedback mechanisms are operational.
## [0.3.24] - 2024-09-24
### Added
+1
View File
@@ -52,6 +52,7 @@ def serve(
)
os.environ["USE_CUDA_DOCKER"] = "false"
os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
import open_webui.main # we need set environment variables before importing main
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
+4 -4
View File
@@ -48,8 +48,6 @@ else:
)
app = socketio.ASGIApp(sio, socketio_path="/ws/socket.io")
# Dictionary to maintain the user pool
if WEBSOCKET_MANAGER == "redis":
@@ -92,8 +90,10 @@ async def periodic_usage_pool_cleanup():
await asyncio.sleep(TIMEOUT_DURATION)
# Start the cleanup task when your app starts
asyncio.create_task(periodic_usage_pool_cleanup())
app = socketio.ASGIApp(
sio,
socketio_path="/ws/socket.io",
)
def get_models_in_use():
+5 -2
View File
@@ -8,6 +8,8 @@ import shutil
import sys
import time
import uuid
import asyncio
from contextlib import asynccontextmanager
from typing import Optional
@@ -31,7 +33,7 @@ from open_webui.apps.openai.main import (
from open_webui.apps.openai.main import get_all_models as get_openai_models
from open_webui.apps.rag.main import app as rag_app
from open_webui.apps.rag.utils import get_rag_context, rag_template
from open_webui.apps.socket.main import app as socket_app
from open_webui.apps.socket.main import app as socket_app, periodic_usage_pool_cleanup
from open_webui.apps.socket.main import get_event_call, get_event_emitter
from open_webui.apps.webui.internal.db import Session
from open_webui.apps.webui.main import app as webui_app
@@ -184,6 +186,8 @@ https://github.com/open-webui/open-webui
@asynccontextmanager
async def lifespan(app: FastAPI):
run_migrations()
asyncio.create_task(periodic_usage_pool_cleanup())
yield
@@ -851,7 +855,6 @@ async def inspect_websocket(request: Request, call_next):
app.mount("/ws", socket_app)
app.mount("/ollama", ollama_app)
app.mount("/openai", openai_app)
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "open-webui",
"version": "0.3.24",
"version": "0.3.27",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-webui",
"version": "0.3.24",
"version": "0.3.27",
"dependencies": {
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-python": "^6.1.6",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "open-webui",
"version": "0.3.24",
"version": "0.3.27",
"private": true,
"scripts": {
"dev": "npm run pyodide:fetch && vite dev --host",
@@ -7,9 +7,8 @@
const dispatch = createEventDispatcher();
export let messageId = null;
export let show = false;
export let message;
export let show = false;
let LIKE_REASONS = [];
let DISLIKE_REASONS = [];
@@ -54,8 +53,10 @@
const submitHandler = () => {
console.log('submitHandler');
message.annotation.reason = selectedReason;
message.annotation.comment = comment;
if (!selectedReason) {
toast.error($i18n.t('Please select a reason'));
return;
}
dispatch('submit', {
reason: selectedReason,
@@ -69,7 +70,7 @@
<div
class=" my-2.5 rounded-xl px-4 py-3 border dark:border-gray-850"
id="message-feedback-{messageId}"
id="message-feedback-{message.id}"
>
<div class="flex justify-between items-center">
<div class=" text-sm">{$i18n.t('Tell us more:')}</div>
@@ -304,12 +304,12 @@
console.log(res);
if (res) {
message.files = res.map((image) => ({
const files = res.map((image) => ({
type: 'image',
url: `${image.url}`
}));
dispatch('save', message);
dispatch('save', { ...message, files: files });
}
generatingImage = false;
@@ -1035,11 +1035,17 @@
{#if message.done && showRateComment}
<RateComment
messageId={message.id}
bind:show={showRateComment}
bind:message
bind:show={showRateComment}
on:submit={(e) => {
dispatch('update');
dispatch('save', {
...message,
annotation: {
...message.annotation,
comment: e.detail.comment,
reason: e.detail.reason
}
});
(model?.actions ?? [])
.filter((action) => action?.__webui__ ?? false)
.forEach((action) => {
@@ -497,6 +497,7 @@
"Plain text (.txt)": "نص عادي (.txt)",
"Playground": "مكان التجربة",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "موقف ايجابي",
"Previous 30 days": "أخر 30 يوم",
"Previous 7 days": "أخر 7 أيام",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Plain text (.txt)",
"Playground": "Плейграунд",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Позитивна ативност",
"Previous 30 days": "Предыдущите 30 дни",
"Previous 7 days": "Предыдущите 7 дни",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "প্লায়েন টেক্সট (.txt)",
"Playground": "খেলাঘর",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "পজিটিভ আক্রমণ",
"Previous 30 days": "পূর্ব ৩০ দিন",
"Previous 7 days": "পূর্ব দিন",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Text pla (.txt)",
"Playground": "Zona de jocs",
"Please carefully review the following warnings:": "Si us plau, revisa els següents avisos amb cura:",
"Please select a reason": "",
"Positive attitude": "Actitud positiva",
"Previous 30 days": "30 dies anteriors",
"Previous 7 days": "7 dies anteriors",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "",
"Playground": "Dulaanan",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "",
"Previous 30 days": "",
"Previous 7 days": "",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Nur Text (.txt)",
"Playground": "Testumgebung",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Positive Einstellung",
"Previous 30 days": "Vorherige 30 Tage",
"Previous 7 days": "Vorherige 7 Tage",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Plain text (.txt)",
"Playground": "Playground",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "",
"Previous 30 days": "",
"Previous 7 days": "",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "",
"Playground": "",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "",
"Previous 30 days": "",
"Previous 7 days": "",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "",
"Playground": "",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "",
"Previous 30 days": "",
"Previous 7 days": "",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Texto plano (.txt)",
"Playground": "Patio de juegos",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Actitud positiva",
"Previous 30 days": "Últimos 30 días",
"Previous 7 days": "Últimos 7 días",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "متن ساده (.txt)",
"Playground": "زمین بازی",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "نظرات مثبت",
"Previous 30 days": "30 روز قبل",
"Previous 7 days": "7 روز قبل",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Pelkkä teksti (.txt)",
"Playground": "Leikkipaikka",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Positiivinen asenne",
"Previous 30 days": "Edelliset 30 päivää",
"Previous 7 days": "Edelliset 7 päivää",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Texte simple (.txt)",
"Playground": "Aire de jeux",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Attitude positive",
"Previous 30 days": "30 derniers jours",
"Previous 7 days": "7 derniers jours",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Texte simple (.txt)",
"Playground": "Playground",
"Please carefully review the following warnings:": "Veuillez lire attentivement les avertissements suivants :",
"Please select a reason": "",
"Positive attitude": "Attitude positive",
"Previous 30 days": "30 derniers jours",
"Previous 7 days": "7 derniers jours",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "טקסט פשוט (.txt)",
"Playground": "אזור משחקים",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "גישה חיובית",
"Previous 30 days": "30 הימים הקודמים",
"Previous 7 days": "7 הימים הקודמים",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "सादा पाठ (.txt)",
"Playground": "कार्यक्षेत्र",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "सकारात्मक रवैया",
"Previous 30 days": "पिछले 30 दिन",
"Previous 7 days": "पिछले 7 दिन",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Običan tekst (.txt)",
"Playground": "Igralište",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Pozitivan stav",
"Previous 30 days": "Prethodnih 30 dana",
"Previous 7 days": "Prethodnih 7 dana",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Teks biasa (.txt)",
"Playground": "Taman bermain",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Sikap positif",
"Previous 30 days": "30 hari sebelumnya",
"Previous 7 days": "7 hari sebelumnya",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Testo normale (.txt)",
"Playground": "Terreno di gioco",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Attitudine positiva",
"Previous 30 days": "Ultimi 30 giorni",
"Previous 7 days": "Ultimi 7 giorni",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "プレーンテキスト (.txt)",
"Playground": "プレイグラウンド",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "陽気な態度",
"Previous 30 days": "前の30日間",
"Previous 7 days": "前の7日間",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "ტექსტი (.txt)",
"Playground": "სათამაშო მოედანი",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "პოზიტიური ანგარიში",
"Previous 30 days": "უკან 30 დღე",
"Previous 7 days": "უკან 7 დღე",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "일반 텍스트(.txt)",
"Playground": "놀이터",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "긍정적인 자세",
"Previous 30 days": "이전 30일",
"Previous 7 days": "이전 7일",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Grynas tekstas (.txt)",
"Playground": "Eksperimentavimo erdvė",
"Please carefully review the following warnings:": "Peržiūrėkite šiuos perspėjimus:",
"Please select a reason": "",
"Positive attitude": "Pozityvus elgesys",
"Previous 30 days": "Paskutinės 30 dienų",
"Previous 7 days": "Paskutinės 7 dienos",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Teks biasa (.txt)",
"Playground": "Taman Permainan",
"Please carefully review the following warnings:": "Sila semak dengan teliti amaran berikut:",
"Please select a reason": "",
"Positive attitude": "Sikap positif",
"Previous 30 days": "30 hari sebelumnya",
"Previous 7 days": "7 hari sebelumnya",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Ren tekst (.txt)",
"Playground": "Lekeplass",
"Please carefully review the following warnings:": "Vær vennlig å lese gjennom følgende advarsler grundig:",
"Please select a reason": "",
"Positive attitude": "Positiv holdning",
"Previous 30 days": "Forrige 30 dager",
"Previous 7 days": "Forrige 7 dager",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Platte tekst (.txt)",
"Playground": "Speeltuin",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Positieve positie",
"Previous 30 days": "Vorige 30 dagen",
"Previous 7 days": "Vorige 7 dagen",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "ਸਧਾਰਨ ਪਾਠ (.txt)",
"Playground": "ਖੇਡ ਦਾ ਮੈਦਾਨ",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "ਸਕਾਰਾਤਮਕ ਰਵੱਈਆ",
"Previous 30 days": "ਪਿਛਲੇ 30 ਦਿਨ",
"Previous 7 days": "ਪਿਛਲੇ 7 ਦਿਨ",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Zwykły tekst (.txt)",
"Playground": "Plac zabaw",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Pozytywne podejście",
"Previous 30 days": "Poprzednie 30 dni",
"Previous 7 days": "Poprzednie 7 dni",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Texto simples (.txt)",
"Playground": "Playground",
"Please carefully review the following warnings:": "Por favor, revise cuidadosamente os seguintes avisos:",
"Please select a reason": "",
"Positive attitude": "Atitude positiva",
"Previous 30 days": "Últimos 30 dias",
"Previous 7 days": "Últimos 7 dias",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Texto sem formatação (.txt)",
"Playground": "Recreio",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Atitude Positiva",
"Previous 30 days": "Últimos 30 dias",
"Previous 7 days": "Últimos 7 dias",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Text simplu (.txt)",
"Playground": "Teren de Joacă",
"Please carefully review the following warnings:": "Vă rugăm să revizuiți cu atenție următoarele avertismente:",
"Please select a reason": "",
"Positive attitude": "Atitudine pozitivă",
"Previous 30 days": "Ultimele 30 de zile",
"Previous 7 days": "Ultimele 7 zile",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Текст в формате .txt",
"Playground": "Песочница",
"Please carefully review the following warnings:": "Пожалуйста, внимательно ознакомьтесь со следующими предупреждениями:",
"Please select a reason": "",
"Positive attitude": "Позитивный настрой",
"Previous 30 days": "Предыдущие 30 дней",
"Previous 7 days": "Предыдущие 7 дней",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Обичан текст (.txt)",
"Playground": "Игралиште",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Позитиван став",
"Previous 30 days": "Претходних 30 дана",
"Previous 7 days": "Претходних 7 дана",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Text (.txt)",
"Playground": "Lekplats",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "Positivt inställning",
"Previous 30 days": "Föregående 30 dagar",
"Previous 7 days": "Föregående 7 dagar",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "ไฟล์ข้อความ (.txt)",
"Playground": "สนามทดสอบ",
"Please carefully review the following warnings:": "โปรดตรวจสอบคำเตือนต่อไปนี้อย่างละเอียด:",
"Please select a reason": "",
"Positive attitude": "ทัศนคติด้านบวก",
"Previous 30 days": "30 วันที่ผ่านมา",
"Previous 7 days": "7 วันที่ผ่านมา",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "",
"Playground": "",
"Please carefully review the following warnings:": "",
"Please select a reason": "",
"Positive attitude": "",
"Previous 30 days": "",
"Previous 7 days": "",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Düz metin (.txt)",
"Playground": "Oyun Alanı",
"Please carefully review the following warnings:": "Lütfen aşağıdaki uyarıları dikkatlice inceleyin:",
"Please select a reason": "",
"Positive attitude": "Olumlu yaklaşım",
"Previous 30 days": "Önceki 30 gün",
"Previous 7 days": "Önceki 7 gün",
+18 -17
View File
@@ -9,7 +9,7 @@
"{{user}}'s Chats": "Чати {{user}}а",
"{{webUIName}} Backend Required": "Необхідно підключення бекенду {{webUIName}}",
"*Prompt node ID(s) are required for image generation": "*Для генерації зображення потрібно вказати ідентифікатор(и) вузла(ів)",
"A new version (v{{LATEST_VERSION}}) is now available.": "",
"A new version (v{{LATEST_VERSION}}) is now available.": "Нова версія (в{{LATEST_VERSION}}) зараз доступна.",
"A task model is used when performing tasks such as generating titles for chats and web search queries": "Модель задач використовується при виконанні таких завдань, як генерація заголовків для чатів та пошукових запитів в Інтернеті",
"a user": "користувача",
"About": "Про програму",
@@ -74,10 +74,10 @@
"AUTOMATIC1111 Api Auth String": "AUTOMATIC1111 Рядок авторизації API",
"AUTOMATIC1111 Base URL": "URL-адреса AUTOMATIC1111",
"AUTOMATIC1111 Base URL is required.": "Необхідна URL-адреса AUTOMATIC1111.",
"Available list": "",
"Available list": "Список доступності",
"available!": "доступно!",
"Azure AI Speech": "",
"Azure Region": "",
"Azure AI Speech": "Мовлення Azure AI",
"Azure Region": "Регіон Azure",
"Back": "Назад",
"Bad Response": "Неправильна відповідь",
"Banners": "Прапори",
@@ -98,7 +98,7 @@
"Chat Bubble UI": "Чат у вигляді бульбашок",
"Chat Controls": "Керування чатом",
"Chat direction": "Напрям чату",
"Chat Overview": "",
"Chat Overview": "Огляд чату",
"Chats": "Чати",
"Check Again": "Перевірити ще раз",
"Check for updates": "Перевірити оновлення",
@@ -416,8 +416,8 @@
"Model {{modelId}} not found": "Модель {{modelId}} не знайдено",
"Model {{modelName}} is not vision capable": "Модель {{modelName}} не здатна бачити",
"Model {{name}} is now {{status}}": "Модель {{name}} тепер має {{status}}",
"Model {{name}} is now at the top": "",
"Model accepts image inputs": "",
"Model {{name}} is now at the top": "Модель {{name}} тепер на першому місці",
"Model accepts image inputs": "Модель приймає зображеня",
"Model created successfully!": "Модель створено успішно!",
"Model filesystem path detected. Model shortname is required for update, cannot continue.": "Виявлено шлях до файлової системи моделі. Для оновлення потрібно вказати коротке ім'я моделі, не вдасться продовжити.",
"Model ID": "ID моделі",
@@ -429,7 +429,7 @@
"Modelfile Content": "Вміст файлу моделі",
"Models": "Моделі",
"More": "Більше",
"Move to Top": "",
"Move to Top": "Перейти до початку",
"Name": "Ім'я",
"Name Tag": "Назва тегу",
"Name your model": "Назвіть свою модель",
@@ -466,7 +466,7 @@
"Oops! Looks like the URL is invalid. Please double-check and try again.": "Упс! Схоже, що URL-адреса невірна. Будь ласка, перевірте ще раз та спробуйте ще раз.",
"Oops! There was an error in the previous response. Please try again or contact admin.": "Упс! У попередній відповіді сталася помилка. Будь ласка, спробуйте ще раз або зверніться до адміністратора.",
"Oops! You're using an unsupported method (frontend only). Please serve the WebUI from the backend.": "Упс! Ви використовуєте непідтримуваний метод (тільки для фронтенду). Будь ласка, обслуговуйте WebUI з бекенду.",
"Open file": "",
"Open file": "Відкрити файл",
"Open new chat": "Відкрити новий чат",
"Open WebUI version (v{{OPEN_WEBUI_VERSION}}) is lower than required version (v{{REQUIRED_VERSION}})": "Open WebUI версія (v{{OPEN_WEBUI_VERSION}}) нижча за необхідну версію (v{{REQUIRED_VERSION}})",
"OpenAI": "OpenAI",
@@ -476,9 +476,9 @@
"OpenAI URL/Key required.": "Потрібен OpenAI URL/ключ.",
"or": "або",
"Other": "Інше",
"Output format": "",
"Overview": "",
"page": "",
"Output format": "Формат відповіді",
"Overview": "Огляд",
"page": "сторінка",
"Password": "Пароль",
"PDF document (.pdf)": "PDF документ (.pdf)",
"PDF Extract Images (OCR)": "Розпізнавання зображень з PDF (OCR)",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Простий текст (.txt)",
"Playground": "Майданчик",
"Please carefully review the following warnings:": "Будь ласка, уважно ознайомтеся з наступними попередженнями:",
"Please select a reason": "",
"Positive attitude": "Позитивне ставлення",
"Previous 30 days": "Попередні 30 днів",
"Previous 7 days": "Попередні 7 днів",
@@ -541,7 +542,7 @@
"Save": "Зберегти",
"Save & Create": "Зберегти та створити",
"Save & Update": "Зберегти та оновити",
"Save As Copy": "",
"Save As Copy": "Зберегти як копію",
"Save Tag": "Зберегти тег",
"Saving chat logs directly to your browser's storage is no longer supported. Please take a moment to download and delete your chat logs by clicking the button below. Don't worry, you can easily re-import your chat logs to the backend through": "Збереження журналів чату безпосередньо в сховище вашого браузера більше не підтримується. Будь ласка, завантажте та видаліть журнали чату, натиснувши кнопку нижче. Не хвилюйтеся, ви можете легко повторно імпортувати журнали чату до бекенду через",
"Scan": "Сканування",
@@ -586,7 +587,7 @@
"Send": "Надіслати",
"Send a Message": "Надіслати повідомлення",
"Send message": "Надіслати повідомлення",
"Sends `stream_options: { include_usage: true }` in the request.\nSupported providers will return token usage information in the response when set.": "",
"Sends `stream_options: { include_usage: true }` in the request.\nSupported providers will return token usage information in the response when set.": "Відправляє `stream_options: { include_usage: true }` у запиті.\nПідтримувані постачальники повернуть інформацію про використання токену у відповіді, якщо вона встановлена.",
"September": "Вересень",
"Serper API Key": "Ключ API Serper",
"Serply API Key": "Ключ API Serply",
@@ -620,11 +621,11 @@
"Sign up": "Зареєструватися",
"Signing in": "Увійдіть в систему",
"Source": "Джерело",
"Speech Playback Speed": "",
"Speech Playback Speed": "Швидкість відтворення мовлення",
"Speech recognition error: {{error}}": "Помилка розпізнавання мови: {{error}}",
"Speech-to-Text Engine": "Система розпізнавання мови",
"Stop Sequence": "Символ зупинки",
"Stream Chat Response": "",
"Stream Chat Response": "Відповідь стрім-чату",
"STT Model": "Модель STT ",
"STT Settings": "Налаштування STT",
"Submit": "Надіслати",
@@ -704,7 +705,7 @@
"Unpin": "Відчепити",
"Update": "Оновлення",
"Update and Copy Link": "Оновлення та копіювання посилання",
"Update for the latest features and improvements.": "",
"Update for the latest features and improvements.": "Оновіть програми для нових функцій та покращень.",
"Update password": "Оновити пароль",
"Updated at": "Оновлено на",
"Upload": "Завантажити",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "Văn bản thô (.txt)",
"Playground": "Thử nghiệm (Playground)",
"Please carefully review the following warnings:": "Vui lòng xem xét cẩn thận các cảnh báo sau:",
"Please select a reason": "",
"Positive attitude": "Thái độ tích cực",
"Previous 30 days": "30 ngày trước",
"Previous 7 days": "7 ngày trước",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "TXT 文档 (.txt)",
"Playground": "AI 对话游乐场",
"Please carefully review the following warnings:": "请仔细阅读以下警告信息:",
"Please select a reason": "",
"Positive attitude": "积极的态度",
"Previous 30 days": "过去 30 天",
"Previous 7 days": "过去 7 天",
@@ -497,6 +497,7 @@
"Plain text (.txt)": "純文字 (.txt)",
"Playground": "遊樂場",
"Please carefully review the following warnings:": "請仔細閱讀以下警告:",
"Please select a reason": "",
"Positive attitude": "積極的態度",
"Previous 30 days": "過去 30 天",
"Previous 7 days": "過去 7 天",
-18
View File
@@ -8,23 +8,6 @@ import { TTS_RESPONSE_SPLIT } from '$lib/types';
// Helper functions
//////////////////////////
const convertLatexToSingleLine = (content) => {
// Patterns to match multiline LaTeX blocks
const patterns = [
/(\$\$\s[\s\S]*?\s\$\$)/g, // Match $$ ... $$
/(\\\[[\s\S]*?\\\])/g, // Match \[ ... \]
/(\\begin\{[a-z]+\}[\s\S]*?\\end\{[a-z]+\})/g // Match \begin{...} ... \end{...}
];
patterns.forEach((pattern) => {
content = content.replace(pattern, (match) => {
return match.replace(/\s*\n\s*/g, ' ').trim();
});
});
return content;
};
export const replaceTokens = (content, char, user) => {
const charToken = /{{char}}/gi;
const userToken = /{{user}}/gi;
@@ -68,7 +51,6 @@ export const sanitizeResponseContent = (content: string) => {
};
export const processResponseContent = (content: string) => {
content = convertLatexToSingleLine(content);
return content.trim();
};
+84 -75
View File
@@ -1,14 +1,14 @@
import katex from 'katex';
const DELIMITER_LIST = [
{ left: '$$', right: '$$', display: false },
{ left: '$$\n', right: '\n$$', display: true },
{ left: '$$', right: '$$', display: false }, // This should be on top to prevent conflict with $ delimiter
{ left: '$', right: '$', display: false },
{ left: '\\pu{', right: '}', display: false },
{ left: '\\ce{', right: '}', display: false },
{ left: '\\(', right: '\\)', display: false },
{ left: '( ', right: ' )', display: false },
{ left: '\\[', right: '\\]', display: true },
{ left: '[ ', right: ' ]', display: true }
{ left: '\\[\n', right: '\n\\]', display: true },
{ left: '\\[', right: '\\]', display: false }
];
// const DELIMITER_LIST = [
@@ -28,24 +28,20 @@ function escapeRegex(string) {
function generateRegexRules(delimiters) {
delimiters.forEach((delimiter) => {
const { left, right } = delimiter;
const { left, right, display } = delimiter;
// Ensure regex-safe delimiters
const escapedLeft = escapeRegex(left);
const escapedRight = escapeRegex(right);
// Inline pattern - Capture group $1, token content, followed by end delimiter and normal punctuation marks.
// Example: $text$
inlinePatterns.push(
`${escapedLeft}((?:\\\\.|[^\\\\\\n])*?(?:\\\\.|[^\\\\\\n${escapedRight}]))${escapedRight}`
);
// Block pattern - Starts and ends with the delimiter on new lines. Example:
// $$\ncontent here\n$$
blockPatterns.push(`${escapedLeft}\n((?:\\\\[^]|[^\\\\])+?)\n${escapedRight}`);
if (!display) {
inlinePatterns.push(`${escapedLeft}((?:\\\\[^]|[^\\\\])+?)${escapedRight}`);
} else {
blockPatterns.push(`${escapedLeft}((?:\\\\[^]|[^\\\\])+?)${escapedRight}`);
}
});
const inlineRule = new RegExp(`^(${inlinePatterns.join('|')})(?=[\\s?!.,:?!。,:]|$)`, 'u');
const blockRule = new RegExp(`^(${blockPatterns.join('|')})(?:\n|$)`, 'u');
const blockRule = new RegExp(`^(${blockPatterns.join('|')})(?=[\\s?!.,:?!。,:]|$)`, 'u');
return { inlineRule, blockRule };
}
@@ -55,84 +51,97 @@ const { inlineRule, blockRule } = generateRegexRules(DELIMITER_LIST);
export default function (options = {}) {
return {
extensions: [
inlineKatex(options, createRenderer(options, false)),
blockKatex(options, createRenderer(options, true))
blockKatex(options), // This should be on top to prevent conflict with inline delimiters.
inlineKatex(options)
]
};
}
function createRenderer(options, newlineAfter) {
return (token) =>
katex.renderToString(token.text, { ...options, displayMode: token.displayMode }) +
(newlineAfter ? '\n' : '');
function katexStart(src, displayMode: boolean) {
let ruleReg = displayMode ? blockRule : inlineRule;
let indexSrc = src;
while (indexSrc) {
let index = -1;
let startIndex = -1;
let startDelimiter = '';
let endDelimiter = '';
for (let delimiter of DELIMITER_LIST) {
if (delimiter.display !== displayMode) {
continue;
}
startIndex = indexSrc.indexOf(delimiter.left);
if (startIndex === -1) {
continue;
}
index = startIndex;
startDelimiter = delimiter.left;
endDelimiter = delimiter.right;
}
if (index === -1) {
return;
}
const f = index === 0 || indexSrc.charAt(index - 1) === ' ';
if (f) {
const possibleKatex = indexSrc.substring(index);
if (possibleKatex.match(ruleReg)) {
return index;
}
}
indexSrc = indexSrc.substring(index + startDelimiter.length).replace(endDelimiter, '');
}
}
function inlineKatex(options, renderer) {
const ruleReg = inlineRule;
function katexTokenizer(src, tokens, displayMode: boolean) {
let ruleReg = displayMode ? blockRule : inlineRule;
let type = displayMode ? 'blockKatex' : 'inlineKatex';
const match = src.match(ruleReg);
if (match) {
const text = match
.slice(2)
.filter((item) => item)
.find((item) => item.trim());
return {
type,
raw: match[0],
text: text,
displayMode
};
}
}
function inlineKatex(options) {
return {
name: 'inlineKatex',
level: 'inline',
start(src) {
let index;
let indexSrc = src;
while (indexSrc) {
index = indexSrc.indexOf('$');
if (index === -1) {
return;
}
const f = index === 0 || indexSrc.charAt(index - 1) === ' ';
if (f) {
const possibleKatex = indexSrc.substring(index);
if (possibleKatex.match(ruleReg)) {
return index;
}
}
indexSrc = indexSrc.substring(index + 1).replace(/^\$+/, '');
}
return katexStart(src, false);
},
tokenizer(src, tokens) {
const match = src.match(ruleReg);
if (match) {
const text = match
.slice(2)
.filter((item) => item)
.find((item) => item.trim());
return {
type: 'inlineKatex',
raw: match[0],
text: text
};
}
},
renderer
return katexTokenizer(src, tokens, false);
}
};
}
function blockKatex(options, renderer) {
function blockKatex(options) {
return {
name: 'blockKatex',
level: 'block',
tokenizer(src, tokens) {
const match = src.match(blockRule);
if (match) {
const text = match
.slice(2)
.filter((item) => item)
.find((item) => item.trim());
return {
type: 'blockKatex',
raw: match[0],
text: text
};
}
start(src) {
return katexStart(src, true);
},
renderer
tokenizer(src, tokens) {
return katexTokenizer(src, tokens, true);
}
};
}