"src/lib/vscode:/vscode.git/clone" did not exist on "89634046e721c972eb24bd5115bd9eff77513d7a"
Unverified Commit 75e51ecf authored by Que Nguyen's avatar Que Nguyen Committed by GitHub
Browse files

Merge branch 'open-webui:main' into searxng

parents a02ba52d 9e4dd4b8
......@@ -42,6 +42,7 @@
"Allow": "Tillåt",
"Allow Chat Deletion": "Tillåt chattborttagning",
"Allow non-local voices": "Tillåt icke-lokala röster",
"Allow User Location": "",
"alphanumeric characters and hyphens": "alfanumeriska tecken och bindestreck",
"Already have an account?": "Har du redan ett konto?",
"an assistant": "en assistent",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "t.ex. '30s', '10m'. Giltiga tidsenheter är 's', 'm', 'h'.",
"Edit": "Redigera",
"Edit Doc": "Redigera dokument",
"Edit Memory": "",
"Edit User": "Redigera användare",
"Email": "E-post",
"Embedding Batch Size": "Batchstorlek för inbäddning",
......@@ -283,6 +285,7 @@
"Knowledge": "Kunskap",
"Language": "Språk",
"Last Active": "Senast aktiv",
"Last Modified": "",
"Light": "Ljus",
"Listening...": "Lyssnar...",
"LLMs can make mistakes. Verify important information.": "LLM:er kan göra misstag. Granska viktig information.",
......@@ -307,6 +310,7 @@
"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": "",
"Model '{{modelName}}' has been successfully downloaded.": "Modellen '{{modelName}}' har laddats ner framgångsrikt.",
"Model '{{modelTag}}' is already in queue for downloading.": "Modellen '{{modelTag}}' är redan i kö för nedladdning.",
"Model {{modelId}} not found": "Modell {{modelId}} hittades inte",
......@@ -491,6 +495,7 @@
"System": "System",
"System Prompt": "Systeminstruktion",
"Tags": "Taggar",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Berätta mer:",
"Temperature": "Temperatur",
......@@ -534,8 +539,10 @@
"Type Hugging Face Resolve (Download) URL": "Skriv Hugging Face Resolve (nedladdning) URL",
"Uh-oh! There was an issue connecting to {{provider}}.": "Oj då! Det uppstod ett problem med anslutningen till {{provider}}.",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "Okänd filtyp '{{file_type}}', men accepterar och behandlar som vanlig text",
"Update": "",
"Update and Copy Link": "Uppdatera och kopiera länk",
"Update password": "Uppdatera lösenord",
"Updated at": "",
"Upload a GGUF model": "Ladda upp en GGUF-modell",
"Upload Files": "Ladda upp filer",
"Upload Pipeline": "Ladda upp rörledning",
......
......@@ -42,6 +42,7 @@
"Allow": "",
"Allow Chat Deletion": "",
"Allow non-local voices": "",
"Allow User Location": "",
"alphanumeric characters and hyphens": "",
"Already have an account?": "",
"an assistant": "",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "",
"Edit": "",
"Edit Doc": "",
"Edit Memory": "",
"Edit User": "",
"Email": "",
"Embedding Batch Size": "",
......@@ -283,6 +285,7 @@
"Knowledge": "",
"Language": "",
"Last Active": "",
"Last Modified": "",
"Light": "",
"Listening...": "",
"LLMs can make mistakes. Verify important information.": "",
......@@ -307,6 +310,7 @@
"Mirostat Tau": "",
"MMMM DD, YYYY": "",
"MMMM DD, YYYY HH:mm": "",
"MMMM DD, YYYY hh:mm:ss A": "",
"Model '{{modelName}}' has been successfully downloaded.": "",
"Model '{{modelTag}}' is already in queue for downloading.": "",
"Model {{modelId}} not found": "",
......@@ -491,6 +495,7 @@
"System": "",
"System Prompt": "",
"Tags": "",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "",
"Temperature": "",
......@@ -534,8 +539,10 @@
"Type Hugging Face Resolve (Download) URL": "",
"Uh-oh! There was an issue connecting to {{provider}}.": "",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "",
"Update": "",
"Update and Copy Link": "",
"Update password": "",
"Updated at": "",
"Upload a GGUF model": "",
"Upload Files": "",
"Upload Pipeline": "",
......
......@@ -42,6 +42,7 @@
"Allow": "İzin ver",
"Allow Chat Deletion": "Sohbet Silmeye İzin Ver",
"Allow non-local voices": "Yerel olmayan seslere izin verin",
"Allow User Location": "",
"alphanumeric characters and hyphens": "alfanumerik karakterler ve tireler",
"Already have an account?": "Zaten bir hesabınız mı var?",
"an assistant": "bir asistan",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "örn. '30s', '10m'. Geçerli zaman birimleri 's', 'm', 'h'.",
"Edit": "Düzenle",
"Edit Doc": "Belgeyi Düzenle",
"Edit Memory": "",
"Edit User": "Kullanıcıyı Düzenle",
"Email": "E-posta",
"Embedding Batch Size": "Gömme Yığın Boyutu",
......@@ -283,6 +285,7 @@
"Knowledge": "",
"Language": "Dil",
"Last Active": "Son Aktivite",
"Last Modified": "",
"Light": "Açık",
"Listening...": "",
"LLMs can make mistakes. Verify important information.": "LLM'ler hata yapabilir. Önemli bilgileri doğrulayın.",
......@@ -307,6 +310,7 @@
"Mirostat Tau": "Mirostat Tau",
"MMMM DD, YYYY": "DD MMMM YYYY",
"MMMM DD, YYYY HH:mm": "DD MMMM YYYY HH:mm",
"MMMM DD, YYYY hh:mm:ss A": "",
"Model '{{modelName}}' has been successfully downloaded.": "'{{modelName}}' başarıyla indirildi.",
"Model '{{modelTag}}' is already in queue for downloading.": "'{{modelTag}}' zaten indirme sırasında.",
"Model {{modelId}} not found": "{{modelId}} bulunamadı",
......@@ -491,6 +495,7 @@
"System": "Sistem",
"System Prompt": "Sistem Promptu",
"Tags": "Etiketler",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Bize daha fazlasını anlat:",
"Temperature": "Temperature",
......@@ -534,8 +539,10 @@
"Type Hugging Face Resolve (Download) URL": "Hugging Face Resolve (Download) URL'sini Yazın",
"Uh-oh! There was an issue connecting to {{provider}}.": "Ah! {{provider}}'a bağlanırken bir sorun oluştu.",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "Bilinmeyen Dosya Türü '{{file_type}}', ancak düz metin olarak kabul ediliyor ve işleniyor",
"Update": "",
"Update and Copy Link": "Güncelle ve Bağlantıyı Kopyala",
"Update password": "Parolayı Güncelle",
"Updated at": "",
"Upload a GGUF model": "Bir GGUF modeli yükle",
"Upload Files": "Dosyaları Yükle",
"Upload Pipeline": "",
......
......@@ -42,6 +42,7 @@
"Allow": "Дозволити",
"Allow Chat Deletion": "Дозволити видалення чату",
"Allow non-local voices": "Дозволити не локальні голоси",
"Allow User Location": "",
"alphanumeric characters and hyphens": "алфавітно-цифрові символи та дефіси",
"Already have an account?": "Вже є обліковий запис?",
"an assistant": "асистента",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "напр., '30s','10m'. Дійсні одиниці часу: 'с', 'хв', 'г'.",
"Edit": "Редагувати",
"Edit Doc": "Редагувати документ",
"Edit Memory": "",
"Edit User": "Редагувати користувача",
"Email": "Електронна пошта",
"Embedding Batch Size": "Розмір пакету під час вбудовування",
......@@ -283,6 +285,7 @@
"Knowledge": "",
"Language": "Мова",
"Last Active": "Остання активність",
"Last Modified": "",
"Light": "Світла",
"Listening...": "",
"LLMs can make mistakes. Verify important information.": "LLMs можуть помилятися. Перевірте важливу інформацію.",
......@@ -307,6 +310,7 @@
"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": "",
"Model '{{modelName}}' has been successfully downloaded.": "Модель '{{modelName}}' успішно завантажено.",
"Model '{{modelTag}}' is already in queue for downloading.": "Модель '{{modelTag}}' вже знаходиться в черзі на завантаження.",
"Model {{modelId}} not found": "Модель {{modelId}} не знайдено",
......@@ -493,6 +497,7 @@
"System": "Система",
"System Prompt": "Системний промт",
"Tags": "Теги",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Розкажи нам більше:",
"Temperature": "Температура",
......@@ -536,8 +541,10 @@
"Type Hugging Face Resolve (Download) URL": "Введіть URL ресурсу Hugging Face Resolve (завантаження)",
"Uh-oh! There was an issue connecting to {{provider}}.": "Ой! Виникла проблема при підключенні до {{provider}}.",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "Невідомий тип файлу '{{file_type}}', але приймається та обробляється як звичайний текст",
"Update": "",
"Update and Copy Link": "Оновлення та копіювання посилання",
"Update password": "Оновити пароль",
"Updated at": "",
"Upload a GGUF model": "Завантажити GGUF модель",
"Upload Files": "Завантажити файли",
"Upload Pipeline": "Завантаження Pipeline",
......
......@@ -42,6 +42,7 @@
"Allow": "Cho phép",
"Allow Chat Deletion": "Cho phép Xóa nội dung chat",
"Allow non-local voices": "",
"Allow User Location": "",
"alphanumeric characters and hyphens": "ký tự số và gạch nối",
"Already have an account?": "Bạn đã có tài khoản?",
"an assistant": "trợ lý",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "vd: '30s','10m'. Đơn vị thời gian hợp lệ là 's', 'm', 'h'.",
"Edit": "Chỉnh sửa",
"Edit Doc": "Thay đổi tài liệu",
"Edit Memory": "",
"Edit User": "Thay đổi thông tin người sử dụng",
"Email": "Email",
"Embedding Batch Size": "",
......@@ -283,6 +285,7 @@
"Knowledge": "Kiến thức",
"Language": "Ngôn ngữ",
"Last Active": "Truy cập gần nhất",
"Last Modified": "",
"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.",
......@@ -307,6 +310,7 @@
"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": "",
"Model '{{modelName}}' has been successfully downloaded.": "Mô hình '{{modelName}}' đã được tải xuống thành công.",
"Model '{{modelTag}}' is already in queue for downloading.": "Mô hình '{{modelTag}}' đã có trong hàng đợi để tải xuống.",
"Model {{modelId}} not found": "Không tìm thấy Mô hình {{modelId}}",
......@@ -490,6 +494,7 @@
"System": "Hệ thống",
"System Prompt": "Prompt Hệ thống (System Prompt)",
"Tags": "Thẻ",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "Hãy cho chúng tôi hiểu thêm về chất lượng của câu trả lời:",
"Temperature": "Mức độ sáng tạo",
......@@ -533,8 +538,10 @@
"Type Hugging Face Resolve (Download) URL": "Nhập URL Hugging Face Resolve (Tải xuống)",
"Uh-oh! There was an issue connecting to {{provider}}.": "Ồ! Đã xảy ra sự cố khi kết nối với {{provider}}.",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "Loại Tệp Không xác định '{{file_type}}', nhưng đang chấp nhận và xử lý như văn bản thô",
"Update": "",
"Update and Copy Link": "Cập nhật và sao chép link",
"Update password": "Cập nhật mật khẩu",
"Updated at": "",
"Upload a GGUF model": "Tải lên mô hình GGUF",
"Upload Files": "Tải tệp lên máy chủ",
"Upload Pipeline": "",
......
......@@ -42,6 +42,7 @@
"Allow": "允许",
"Allow Chat Deletion": "允许删除聊天记录",
"Allow non-local voices": "允许调用非本地音色",
"Allow User Location": "",
"alphanumeric characters and hyphens": "字母数字字符和连字符",
"Already have an account?": "已经拥有账号了?",
"an assistant": "助手",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "例如 '30s','10m'。有效的时间单位是秒:'s',分:'m',时:'h'。",
"Edit": "编辑",
"Edit Doc": "编辑文档",
"Edit Memory": "",
"Edit User": "编辑用户",
"Email": "电子邮箱",
"Embedding Batch Size": "嵌入层批处理大小 (Embedding Batch Size)",
......@@ -283,6 +285,7 @@
"Knowledge": "知识库",
"Language": "语言",
"Last Active": "最后在线时间",
"Last Modified": "",
"Light": "浅色",
"Listening...": "正在倾听...",
"LLMs can make mistakes. Verify important information.": "大语言模型可能会生成误导性错误信息,请对关键信息加以验证。",
......@@ -307,6 +310,7 @@
"Mirostat Tau": "Mirostat Tau",
"MMMM DD, YYYY": "YYYY年 MM月 DD日",
"MMMM DD, YYYY HH:mm": "YYYY年 MM月 DD日 HH:mm",
"MMMM DD, YYYY hh:mm:ss A": "",
"Model '{{modelName}}' has been successfully downloaded.": "模型'{{modelName}}'已成功下载。",
"Model '{{modelTag}}' is already in queue for downloading.": "模型'{{modelTag}}'已在下载队列中。",
"Model {{modelId}} not found": "未找到模型 {{modelId}}",
......@@ -490,6 +494,7 @@
"System": "系统",
"System Prompt": "系统提示词",
"Tags": "标签",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "请告诉我们更多细节",
"Temperature": "温度 (Temperature)",
......@@ -533,8 +538,10 @@
"Type Hugging Face Resolve (Download) URL": "输入 Hugging Face 解析(下载)URL",
"Uh-oh! There was an issue connecting to {{provider}}.": "糟糕!连接到 {{provider}} 时出现问题。",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "未知文件类型'{{file_type}}',将视为纯文本进行处理",
"Update": "",
"Update and Copy Link": "更新和复制链接",
"Update password": "更新密码",
"Updated at": "",
"Upload a GGUF model": "上传一个 GGUF 模型",
"Upload Files": "上传文件",
"Upload Pipeline": "上传 Pipeline",
......
......@@ -42,6 +42,7 @@
"Allow": "允許",
"Allow Chat Deletion": "允許刪除聊天紀錄",
"Allow non-local voices": "",
"Allow User Location": "",
"alphanumeric characters and hyphens": "英文字母、數字(0~9)和連字符(-)",
"Already have an account?": "已經有帳號了嗎?",
"an assistant": "助手",
......@@ -178,6 +179,7 @@
"e.g. '30s','10m'. Valid time units are 's', 'm', 'h'.": "例如 '30s', '10m'。有效的時間單位為 's', 'm', 'h'。",
"Edit": "編輯",
"Edit Doc": "編輯文件",
"Edit Memory": "",
"Edit User": "編輯使用者",
"Email": "電子郵件",
"Embedding Batch Size": "",
......@@ -283,6 +285,7 @@
"Knowledge": "",
"Language": "語言",
"Last Active": "最後活動",
"Last Modified": "",
"Light": "亮色",
"Listening...": "",
"LLMs can make mistakes. Verify important information.": "LLM 可能會產生錯誤。請驗證重要資訊。",
......@@ -307,6 +310,7 @@
"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": "",
"Model '{{modelName}}' has been successfully downloaded.": "'{{modelName}}' 模型已成功下載。",
"Model '{{modelTag}}' is already in queue for downloading.": "'{{modelTag}}' 模型已經在下載佇列中。",
"Model {{modelId}} not found": "找不到 {{modelId}} 模型",
......@@ -490,6 +494,7 @@
"System": "系統",
"System Prompt": "系統提示詞",
"Tags": "標籤",
"Tap to interrupt": "",
"Tavily API Key": "",
"Tell us more:": "告訴我們更多:",
"Temperature": "溫度",
......@@ -533,8 +538,10 @@
"Type Hugging Face Resolve (Download) URL": "輸入 Hugging Face 解析後的(下載)URL",
"Uh-oh! There was an issue connecting to {{provider}}.": "哎呀!連線到 {{provider}} 時出現問題。",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "未知的文件類型 '{{file_type}}',但接受並視為純文字",
"Update": "",
"Update and Copy Link": "更新並複製連結",
"Update password": "更新密碼",
"Updated at": "",
"Upload a GGUF model": "上傳一個 GGUF 模型",
"Upload Files": "上傳文件",
"Upload Pipeline": "",
......
......@@ -302,6 +302,29 @@ export const getImportOrigin = (_chats) => {
return 'webui';
};
export const getUserPosition = async (raw = false) => {
// Get the user's location using the Geolocation API
const position = await new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(resolve, reject);
}).catch((error) => {
console.error('Error getting user location:', error);
throw error;
});
if (!position) {
return 'Location not available';
}
// Extract the latitude and longitude from the position
const { latitude, longitude } = position.coords;
if (raw) {
return { latitude, longitude };
} else {
return `${latitude.toFixed(3)}, ${longitude.toFixed(3)} (lat, long)`;
}
};
const convertOpenAIMessages = (convo) => {
// Parse OpenAI chat messages and create chat dictionary for creating new chats
const mapping = convo['mapping'];
......@@ -474,7 +497,7 @@ export const blobToFile = (blob, fileName) => {
export const promptTemplate = (
template: string,
user_name?: string,
current_location?: string
user_location?: string
): string => {
// Get the current date
const currentDate = new Date();
......@@ -487,17 +510,31 @@ export const promptTemplate = (
'-' +
String(currentDate.getDate()).padStart(2, '0');
// Format the time to HH:MM:SS AM/PM
const currentTime = currentDate.toLocaleTimeString('en-US', {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: true
});
// Replace {{CURRENT_DATETIME}} in the template with the formatted datetime
template = template.replace('{{CURRENT_DATETIME}}', `${formattedDate} ${currentTime}`);
// Replace {{CURRENT_DATE}} in the template with the formatted date
template = template.replace('{{CURRENT_DATE}}', formattedDate);
// Replace {{CURRENT_TIME}} in the template with the formatted time
template = template.replace('{{CURRENT_TIME}}', currentTime);
if (user_name) {
// Replace {{USER_NAME}} in the template with the user's name
template = template.replace('{{USER_NAME}}', user_name);
}
if (current_location) {
// Replace {{CURRENT_LOCATION}} in the template with the current location
template = template.replace('{{CURRENT_LOCATION}}', current_location);
if (user_location) {
// Replace {{USER_LOCATION}} in the template with the current location
template = template.replace('{{USER_LOCATION}}', user_location);
}
return template;
......
......@@ -77,6 +77,17 @@
}
loaded = true;
});
let sortKey = 'created_at'; // default sort key
let sortOrder = 'asc'; // default sort order
function setSortKey(key) {
if (sortKey === key) {
sortOrder = sortOrder === 'asc' ? 'desc' : 'asc';
} else {
sortKey = key;
sortOrder = 'asc';
}
}
</script>
<ConfirmDialog
......@@ -148,12 +159,66 @@
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 table-auto max-w-full">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-850 dark:text-gray-400">
<tr>
<th scope="col" class="px-3 py-2"> {$i18n.t('Role')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Name')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Email')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Last Active')} </th>
<th scope="col" class="px-3 py-2"> {$i18n.t('Created at')} </th>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('role')}
>
{$i18n.t('Role')}
{#if sortKey === 'role'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible">▲</span>
{/if}
</th>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('name')}
>
{$i18n.t('Name')}
{#if sortKey === 'name'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible">▲</span>
{/if}
</th>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('email')}
>
{$i18n.t('Email')}
{#if sortKey === 'email'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible">▲</span>
{/if}
</th>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('last_active_at')}
>
{$i18n.t('Last Active')}
{#if sortKey === 'last_active_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible">▲</span>
{/if}
</th>
<th
scope="col"
class="px-3 py-2 cursor-pointer select-none"
on:click={() => setSortKey('created_at')}
>
{$i18n.t('Created at')}
{#if sortKey === 'created_at'}
{sortOrder === 'asc' ? '▲' : '▼'}
{:else}
<span class="invisible">▲</span>
{/if}
</th>
<th scope="col" class="px-3 py-2 text-right" />
</tr>
......@@ -169,6 +234,11 @@
return name.includes(query);
}
})
.sort((a, b) => {
if (a[sortKey] < b[sortKey]) return sortOrder === 'asc' ? -1 : 1;
if (a[sortKey] > b[sortKey]) return sortOrder === 'asc' ? 1 : -1;
return 0;
})
.slice((page - 1) * 20, page * 20) as user}
<tr class="bg-white border-b dark:bg-gray-900 dark:border-gray-850 text-xs">
<td class="px-3 py-2 min-w-[7rem] w-28">
......
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