Commit 1bacd5d9 authored by Jun Siang Cheah's avatar Jun Siang Cheah
Browse files

Merge branch 'dev' into feat/model-config

parents 5d3eddf7 4edef531
......@@ -68,6 +68,7 @@
"Change Password": "Alterar Senha",
"Chat": "Bate-papo",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Histórico de Bate-papo",
"Chat History is off for this browser.": "O histórico de bate-papo está desativado para este navegador.",
"Chats": "Bate-papos",
......@@ -249,6 +250,7 @@
"Light": "Claro",
"Listening...": "Ouvindo...",
"LLMs can make mistakes. Verify important information.": "LLMs podem cometer erros. Verifique informações importantes.",
"LTR": "",
"Made by OpenWebUI Community": "Feito pela Comunidade OpenWebUI",
"Make sure to enclose them with": "Certifique-se de colocá-los entre",
"Manage LiteLLM Models": "Gerenciar Modelos LiteLLM",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Máximo de 3 modelos podem ser baixados simultaneamente. Tente novamente mais tarde.",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Função",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Salvar",
"Save & Create": "Salvar e Criar",
"Save & Update": "Salvar e Atualizar",
......
......@@ -68,6 +68,7 @@
"Change Password": "Alterar Senha",
"Chat": "Bate-papo",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Histórico de Bate-papo",
"Chat History is off for this browser.": "O histórico de bate-papo está desativado para este navegador.",
"Chats": "Bate-papos",
......@@ -249,6 +250,7 @@
"Light": "Claro",
"Listening...": "Ouvindo...",
"LLMs can make mistakes. Verify important information.": "LLMs podem cometer erros. Verifique informações importantes.",
"LTR": "",
"Made by OpenWebUI Community": "Feito pela Comunidade OpenWebUI",
"Make sure to enclose them with": "Certifique-se de colocá-los entre",
"Manage LiteLLM Models": "Gerenciar Modelos LiteLLM",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Máximo de 3 modelos podem ser baixados simultaneamente. Tente novamente mais tarde.",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Função",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Salvar",
"Save & Create": "Salvar e Criar",
"Save & Update": "Salvar e Atualizar",
......
......@@ -68,6 +68,7 @@
"Change Password": "Изменить пароль",
"Chat": "Чат",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "История чат",
"Chat History is off for this browser.": "История чат отключен для этого браузера.",
"Chats": "Чаты",
......@@ -249,6 +250,7 @@
"Light": "Светлый",
"Listening...": "Слушаю...",
"LLMs can make mistakes. Verify important information.": "LLMs могут допускать ошибки. Проверяйте важную информацию.",
"LTR": "",
"Made by OpenWebUI Community": "Сделано сообществом OpenWebUI",
"Make sure to enclose them with": "Убедитесь, что они заключены в",
"Manage LiteLLM Models": "Управление моделями LiteLLM",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Максимальное количество моделей для загрузки одновременно - 3. Пожалуйста, попробуйте позже.",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Роль",
"Rosé Pine": "Розовое сосновое дерево",
"Rosé Pine Dawn": "Розовое сосновое дерево рассвет",
"RTL": "",
"Save": "Сохранить",
"Save & Create": "Сохранить и создать",
"Save & Update": "Сохранить и обновить",
......
This diff is collapsed.
......@@ -68,6 +68,7 @@
"Change Password": "Ändra lösenord",
"Chat": "Chatt",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Chatthistorik",
"Chat History is off for this browser.": "Chatthistoriken är avstängd för denna webbläsare.",
"Chats": "Chattar",
......@@ -249,6 +250,7 @@
"Light": "Ljus",
"Listening...": "Lyssnar...",
"LLMs can make mistakes. Verify important information.": "LLM:er kan göra misstag. Verifiera viktig information.",
"LTR": "",
"Made by OpenWebUI Community": "Skapad av OpenWebUI Community",
"Make sure to enclose them with": "Se till att bifoga dem med",
"Manage LiteLLM Models": "Hantera LiteLLM-modeller",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Högst 3 modeller kan laddas ner samtidigt. Vänligen försök igen senare.",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Roll",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Spara",
"Save & Create": "Spara och skapa",
"Save & Update": "Spara och uppdatera",
......
......@@ -68,6 +68,7 @@
"Change Password": "Parola Değiştir",
"Chat": "Sohbet",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Sohbet Geçmişi",
"Chat History is off for this browser.": "Bu tarayıcı için sohbet geçmişi kapalı.",
"Chats": "Sohbetler",
......@@ -249,6 +250,7 @@
"Light": "Açık",
"Listening...": "Dinleniyor...",
"LLMs can make mistakes. Verify important information.": "LLM'ler hata yapabilir. Önemli bilgileri doğrulayın.",
"LTR": "",
"Made by OpenWebUI Community": "OpenWebUI Topluluğu tarafından yapılmıştır",
"Make sure to enclose them with": "Değişkenlerinizi şu şekilde biçimlendirin:",
"Manage LiteLLM Models": "LiteLLM Modellerini Yönet",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Aynı anda en fazla 3 model indirilebilir. Lütfen daha sonra tekrar deneyin.",
"May": "Mayıs",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "Bağlantınızı oluşturduktan sonra gönderdiğiniz mesajlar paylaşılmayacaktır. URL'ye sahip kullanıcılar paylaşılan sohbeti görüntüleyebilecektir.",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "Minimum Skor",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Rol",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Kaydet",
"Save & Create": "Kaydet ve Oluştur",
"Save & Update": "Kaydet ve Güncelle",
......
......@@ -68,6 +68,7 @@
"Change Password": "Змінити пароль",
"Chat": "Чат",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Історія чату",
"Chat History is off for this browser.": "Історія чату вимкнена для цього браузера.",
"Chats": "Чати",
......@@ -249,6 +250,7 @@
"Light": "Світла",
"Listening...": "Слухаю...",
"LLMs can make mistakes. Verify important information.": "LLMs можуть помилятися. Перевірте важливу інформацію.",
"LTR": "",
"Made by OpenWebUI Community": "Зроблено спільнотою OpenWebUI",
"Make sure to enclose them with": "Переконайтеся, що вони закриті",
"Manage LiteLLM Models": "Керування моделями LiteLLM",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Максимум 3 моделі можна завантажити одночасно. Будь ласка, спробуйте пізніше.",
"May": "Травень",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "Повідомлення, які ви надсилаєте після створення посилання, не будуть опубліковані. Користувачі з URL-адресою зможуть переглядати спільний чат.",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "Мінімальний бал",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Роль",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Зберегти",
"Save & Create": "Зберегти та створити",
"Save & Update": "Зберегти та оновити",
......
......@@ -68,6 +68,7 @@
"Change Password": "Đổi Mật khẩu",
"Chat": "Trò chuyện",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "Lịch sử chat",
"Chat History is off for this browser.": "Lịch sử chat đã tắt cho trình duyệt này.",
"Chats": "Chat",
......@@ -249,6 +250,7 @@
"Light": "Sáng",
"Listening...": "Đang nghe...",
"LLMs can make mistakes. Verify important information.": "Hệ thống có thể tạo ra nội dung không chính xác hoặc sai. Hãy kiểm chứng kỹ lưỡng thông tin trước khi tiếp nhận và sử dụng.",
"LTR": "",
"Made by OpenWebUI Community": "Được tạo bởi Cộng đồng OpenWebUI",
"Make sure to enclose them with": "Hãy chắc chắn bao quanh chúng bằng",
"Manage LiteLLM Models": "Quản lý mô hình với LiteLLM",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "Tối đa 3 mô hình có thể được tải xuống cùng lúc. Vui lòng thử lại sau.",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Vai trò",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "Lưu",
"Save & Create": "Lưu & Tạo",
"Save & Update": "Lưu & Cập nhật",
......
......@@ -68,6 +68,7 @@
"Change Password": "更改密码",
"Chat": "聊天",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "聊天历史",
"Chat History is off for this browser.": "此浏览器已关闭聊天历史功能。",
"Chats": "聊天",
......@@ -249,6 +250,7 @@
"Light": "浅色",
"Listening...": "监听中...",
"LLMs can make mistakes. Verify important information.": "LLM 可能会生成错误信息,请验证重要信息。",
"LTR": "",
"Made by OpenWebUI Community": "由 OpenWebUI 社区制作",
"Make sure to enclose them with": "确保将它们包含在内",
"Manage LiteLLM Models": "管理 LiteLLM 模型",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "最多可以同时下载 3 个模型,请稍后重试。",
"May": "五月",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "创建链接后发送的信息不会被共享。拥有 URL 的用户可以查看共享的聊天内容。",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "最低分",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "角色",
"Rosé Pine": "Rosé Pine",
"Rosé Pine Dawn": "Rosé Pine Dawn",
"RTL": "",
"Save": "保存",
"Save & Create": "保存并创建",
"Save & Update": "保存并更新",
......
......@@ -68,6 +68,7 @@
"Change Password": "修改密碼",
"Chat": "聊天",
"Chat Bubble UI": "",
"Chat direction": "",
"Chat History": "聊天紀錄功能",
"Chat History is off for this browser.": "此瀏覽器已關閉聊天紀錄功能。",
"Chats": "聊天",
......@@ -249,6 +250,7 @@
"Light": "亮色",
"Listening...": "正在聽取...",
"LLMs can make mistakes. Verify important information.": "LLM 可能會產生錯誤。請驗證重要資訊。",
"LTR": "",
"Made by OpenWebUI Community": "由 OpenWebUI 社區製作",
"Make sure to enclose them with": "請確保變數有被以下符號框住:",
"Manage LiteLLM Models": "管理 LiteLLM 模型",
......@@ -260,7 +262,7 @@
"Maximum of 3 models can be downloaded simultaneously. Please try again later.": "最多可以同時下載 3 個模型。請稍後再試。",
"May": "",
"Memory": "",
"Messages you send after creating your link won't be shared. Users with the URL will beable to view the shared chat.": "",
"Messages you send after creating your link won't be shared. Users with the URL will be able to view the shared chat.": "",
"Minimum Score": "",
"Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta",
......@@ -371,6 +373,7 @@
"Role": "Role",
"Rosé Pine": "玫瑰松",
"Rosé Pine Dawn": "黎明玫瑰松",
"RTL": "",
"Save": "儲存",
"Save & Create": "儲存並建立",
"Save & Update": "儲存並更新",
......
......@@ -91,6 +91,7 @@ type Settings = {
notificationEnabled?: boolean;
title?: TitleSettings;
splitLargeDeltas?: boolean;
chatDirection: 'LTR' | 'RTL';
system?: string;
requestFormat?: string;
......
......@@ -6,15 +6,15 @@ import { getLiteLLMModels } from '$lib/apis/litellm';
export const getModels = async (token: string) => {
let models = await Promise.all([
await getOllamaModels(token).catch((error) => {
getOllamaModels(token).catch((error) => {
console.log(error);
return null;
}),
await getOpenAIModels(token).catch((error) => {
getOpenAIModels(token).catch((error) => {
console.log(error);
return null;
}),
await getLiteLLMModels(token).catch((error) => {
getLiteLLMModels(token).catch((error) => {
console.log(error);
return null;
})
......
import { loadPyodide, type PyodideInterface } from 'pyodide';
declare global {
interface Window {
stdout: string | null;
stderr: string | null;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
result: any;
pyodide: PyodideInterface;
packages: string[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}
}
async function loadPyodideAndPackages(packages: string[] = []) {
self.stdout = null;
self.stderr = null;
self.result = null;
self.pyodide = await loadPyodide({
indexURL: '/pyodide/',
stdout: (text) => {
console.log('Python output:', text);
if (self.stdout) {
self.stdout += `${text}\n`;
} else {
self.stdout = `${text}\n`;
}
},
stderr: (text) => {
console.log('An error occurred:', text);
if (self.stderr) {
self.stderr += `${text}\n`;
} else {
self.stderr = `${text}\n`;
}
},
packages: ['micropip']
});
const micropip = self.pyodide.pyimport('micropip');
await micropip.set_index_urls('https://pypi.org/pypi/{package_name}/json');
await micropip.install(packages);
}
self.onmessage = async (event) => {
const { id, code, ...context } = event.data;
console.log(event.data);
// The worker copies the context in its own "memory" (an object mapping name to values)
for (const key of Object.keys(context)) {
self[key] = context[key];
}
// make sure loading is done
await loadPyodideAndPackages(self.packages);
self.result = await self.pyodide.runPythonAsync(code);
self.postMessage({ id, result: self.result, stdout: self.stdout, stderr: self.stderr });
};
export default {};
<script>
import { WEBUI_API_BASE_URL } from '$lib/constants';
import { WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores';
import { goto } from '$app/navigation';
import { onMount, getContext } from 'svelte';
......@@ -264,7 +264,11 @@
<div class="flex flex-row w-max">
<img
class=" rounded-full w-6 h-6 object-cover mr-2.5"
src={user.profile_image_url}
src={user.profile_image_url.startsWith(WEBUI_BASE_URL) ||
user.profile_image_url.startsWith('https://www.gravatar.com/avatar/') ||
user.profile_image_url.startsWith('data:')
? user.profile_image_url
: `/user.png`}
alt="user"
/>
......
......@@ -947,6 +947,7 @@
bind:history
bind:messages
bind:autoScroll
bind:prompt
bottomPadding={files.length > 0}
{sendPrompt}
{continueGeneration}
......@@ -962,7 +963,6 @@
bind:prompt
bind:autoScroll
bind:selectedModel={atSelectedModel}
suggestionPrompts={selectedModelfile?.suggestionPrompts ?? $config.default_prompt_suggestions}
{messages}
{submitPrompt}
{stopResponse}
......
......@@ -89,7 +89,7 @@
<svelte:head>
<title>{$WEBUI_NAME}</title>
<link rel="icon" href="{WEBUI_BASE_URL}/static/favicon.png" />
<link crossorigin="anonymous" rel="icon" href="{WEBUI_BASE_URL}/static/favicon.png" />
<!-- rosepine themes have been disabled as it's not up to date with our latest version. -->
<!-- feel free to make a PR to fix if anyone wants to see it return -->
......
......@@ -76,7 +76,12 @@
<div class="fixed m-10 z-50">
<div class="flex space-x-2">
<div class=" self-center">
<img src="{WEBUI_BASE_URL}/static/favicon.png" class=" w-8 rounded-full" alt="logo" />
<img
crossorigin="anonymous"
src="{WEBUI_BASE_URL}/static/favicon.png"
class=" w-8 rounded-full"
alt="logo"
/>
</div>
</div>
</div>
......
......@@ -12,6 +12,8 @@
import Messages from '$lib/components/chat/Messages.svelte';
import Navbar from '$lib/components/layout/Navbar.svelte';
import { getUserById } from '$lib/apis/users';
import { error } from '@sveltejs/kit';
const i18n = getContext('i18n');
......@@ -37,6 +39,7 @@
}, {});
let chat = null;
let user = null;
let title = '';
let files = [];
......@@ -88,6 +91,11 @@
});
if (chat) {
user = await getUserById(localStorage.token, chat.user_id).catch((error) => {
console.error(error);
return null;
});
const chatContent = chat.chat;
if (chatContent) {
......@@ -156,6 +164,7 @@
<div class=" h-full w-full flex flex-col py-4">
<div class="py-2">
<Messages
{user}
chatId={$chatId}
readOnly={true}
{selectedModels}
......
This diff is collapsed.
......@@ -6,7 +6,6 @@ const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment