Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
44c8b0bb
Commit
44c8b0bb
authored
May 12, 2024
by
Jun Siang Cheah
Browse files
feat: rename title generation model to task model
parent
466b3e36
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
26 deletions
+30
-26
src/lib/i18n/locales/pl-PL/translation.json
src/lib/i18n/locales/pl-PL/translation.json
+2
-1
src/lib/i18n/locales/pt-BR/translation.json
src/lib/i18n/locales/pt-BR/translation.json
+2
-1
src/lib/i18n/locales/pt-PT/translation.json
src/lib/i18n/locales/pt-PT/translation.json
+2
-1
src/lib/i18n/locales/ru-RU/translation.json
src/lib/i18n/locales/ru-RU/translation.json
+2
-1
src/lib/i18n/locales/sv-SE/translation.json
src/lib/i18n/locales/sv-SE/translation.json
+2
-1
src/lib/i18n/locales/tr-TR/translation.json
src/lib/i18n/locales/tr-TR/translation.json
+2
-1
src/lib/i18n/locales/uk-UA/translation.json
src/lib/i18n/locales/uk-UA/translation.json
+2
-1
src/lib/i18n/locales/vi-VN/translation.json
src/lib/i18n/locales/vi-VN/translation.json
+2
-1
src/lib/i18n/locales/zh-CN/translation.json
src/lib/i18n/locales/zh-CN/translation.json
+2
-1
src/lib/i18n/locales/zh-TW/translation.json
src/lib/i18n/locales/zh-TW/translation.json
+2
-1
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+5
-8
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+5
-8
No files found.
src/lib/i18n/locales/pl-PL/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} myśli..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"Backend {{webUIName}} wymagane"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"użytkownik"
,
"About"
:
"O nas"
,
"Account"
:
"Konto"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Ustaw model"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Ustaw kroki"
,
"Set T
itle Auto-Generation Model"
:
"Ustaw model automatycznego generowania tytułów
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Ustaw głos"
,
"Settings"
:
"Ustawienia"
,
"Settings saved successfully!"
:
"Ustawienia zapisane pomyślnie!"
,
...
...
src/lib/i18n/locales/pt-BR/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} está pensando..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} Backend Necessário"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"um usuário"
,
"About"
:
"Sobre"
,
"Account"
:
"Conta"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Definir Modelo"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Definir Etapas"
,
"Set T
itle Auto-Generation Model"
:
"Definir Modelo de Geração Automática de Título
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Definir Voz"
,
"Settings"
:
"Configurações"
,
"Settings saved successfully!"
:
"Configurações salvas com sucesso!"
,
...
...
src/lib/i18n/locales/pt-PT/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} está pensando..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} Backend Necessário"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"um usuário"
,
"About"
:
"Sobre"
,
"Account"
:
"Conta"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Definir Modelo"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Definir Etapas"
,
"Set T
itle Auto-Generation Model"
:
"Definir Modelo de Geração Automática de Título
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Definir Voz"
,
"Settings"
:
"Configurações"
,
"Settings saved successfully!"
:
"Configurações salvas com sucesso!"
,
...
...
src/lib/i18n/locales/ru-RU/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} думает..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} бэкенд требуемый"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"пользователь"
,
"About"
:
"Об"
,
"Account"
:
"Аккаунт"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Установить модель"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Установить шаги"
,
"Set T
itle Auto-Generation Model"
:
"Установить модель автогенерации заголовков
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Установить голос"
,
"Settings"
:
"Настройки"
,
"Settings saved successfully!"
:
"Настройки успешно сохранены!"
,
...
...
src/lib/i18n/locales/sv-SE/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} tänker..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} Backend krävs"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"en användare"
,
"About"
:
"Om"
,
"Account"
:
"Konto"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Ställ in modell"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Ange steg"
,
"Set T
itle Auto-Generation Model"
:
"Ange modell för automatisk generering av titel
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Ange röst"
,
"Settings"
:
"Inställningar"
,
"Settings saved successfully!"
:
"Inställningar sparades framgångsrikt!"
,
...
...
src/lib/i18n/locales/tr-TR/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} düşünüyor..."
,
"{{user}}'s Chats"
:
"{{user}} Sohbetleri"
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} Arkayüz Gerekli"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"bir kullanıcı"
,
"About"
:
"Hakkında"
,
"Account"
:
"Hesap"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Model Ayarla"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Adımları Ayarla"
,
"Set T
itle Auto-Generation Model"
:
"Otomatik Başlık Oluşturma Modelini Ayarla
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Ses Ayarla"
,
"Settings"
:
"Ayarlar"
,
"Settings saved successfully!"
:
"Ayarlar başarıyla kaydedildi!"
,
...
...
src/lib/i18n/locales/uk-UA/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} думає..."
,
"{{user}}'s Chats"
:
"Чати {{user}}а"
,
"{{webUIName}} Backend Required"
:
"Необхідно підключення бекенду {{webUIName}}"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"користувача"
,
"About"
:
"Про програму"
,
"Account"
:
"Обліковий запис"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Встановити модель"
,
"Set reranking model (e.g. {{model}})"
:
"Встановити модель переранжування (напр., {{model}})"
,
"Set Steps"
:
"Встановити кроки"
,
"Set T
itle Auto-Generation Model"
:
"Встановити модель автогенерації заголовків
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Встановити голос"
,
"Settings"
:
"Налаштування"
,
"Settings saved successfully!"
:
"Налаштування успішно збережено!"
,
...
...
src/lib/i18n/locales/vi-VN/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} đang suy nghĩ..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"{{webUIName}} Yêu cầu Backend"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"người sử dụng"
,
"About"
:
"Giới thiệu"
,
"Account"
:
"Tài khoản"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"Thiết lập mô hình"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"Đặt Số Bước"
,
"Set T
itle Auto-Generation Model"
:
"Đặt tiêu đề tự động
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"Đặt Giọng nói"
,
"Settings"
:
"Cài đặt"
,
"Settings saved successfully!"
:
"Cài đặt đã được lưu thành công!"
,
...
...
src/lib/i18n/locales/zh-CN/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} 正在思考..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"需要 {{webUIName}} 后端"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"用户"
,
"About"
:
"关于"
,
"Account"
:
"账户"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"设置模型"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"设置步骤"
,
"Set T
itle Auto-Generation Model"
:
"设置标题自动生成模型
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"设置声音"
,
"Settings"
:
"设置"
,
"Settings saved successfully!"
:
"设置已保存"
,
...
...
src/lib/i18n/locales/zh-TW/translation.json
View file @
44c8b0bb
...
...
@@ -6,6 +6,7 @@
"{{modelName}} is thinking..."
:
"{{modelName}} 正在思考..."
,
"{{user}}'s Chats"
:
""
,
"{{webUIName}} Backend Required"
:
"需要 {{webUIName}} 後台"
,
"A task model is used when performing tasks such as generating titles for chats and web search queries"
:
""
,
"a user"
:
"使用者"
,
"About"
:
"關於"
,
"Account"
:
"帳號"
,
...
...
@@ -395,7 +396,7 @@
"Set Model"
:
"設定模型"
,
"Set reranking model (e.g. {{model}})"
:
""
,
"Set Steps"
:
"設定步數"
,
"Set T
itle Auto-Generation Model"
:
"設定自動生成標題用模型
"
,
"Set T
ask Model"
:
"
"
,
"Set Voice"
:
"設定語音"
,
"Settings"
:
"設定"
,
"Settings saved successfully!"
:
"成功儲存設定"
,
...
...
src/routes/(app)/+page.svelte
View file @
44c8b0bb
...
...
@@ -860,30 +860,27 @@
}
};
// TODO: Add support for adding all the user'
s
messages
as
context
,
and
not
just
the
last
message
const generateChatSearchQuery = async (messageId: string) => {
const model = $models.find((model) => model.id === selectedModels[0]);
//
TODO
:
rename
titleModel
to
taskModel
-
this
is
the
model
used
for
non
-
chat
tasks
(
e
.
g
.
title
generation
,
search
query
generation
)
const
titleModelId
=
const taskModelId =
model?.external ?? false
? $settings?.title?.modelExternal ?? selectedModels[0]
: $settings?.title?.model ?? selectedModels[0];
const
t
itle
Model
=
$
models
.
find
((
model
)
=>
model
.
id
===
t
itle
ModelId
);
const t
ask
Model = $models.find((model) => model.id === t
ask
ModelId);
const userMessage = history.messages[messageId];
const userPrompt = userMessage.content;
const previousMessages = messages.filter((message) => message.role === '
user
').map((message) => message.content);
console
.
log
(
titleModel
);
return await generateSearchQuery(
localStorage.token,
t
itle
ModelId
,
t
ask
ModelId,
previousMessages,
userPrompt,
t
itle
Model
?.
external
??
false
?
t
itle
Model
?.
source
?.
toLowerCase
()
===
'litellm'
t
ask
Model?.external ?? false
? t
ask
Model?.source?.toLowerCase() === '
litellm
'
? `${LITELLM_API_BASE_URL}/v1`
: `${OPENAI_API_BASE_URL}`
: `${OLLAMA_API_BASE_URL}/v1`
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
44c8b0bb
...
...
@@ -865,30 +865,27 @@
}
};
// TODO: Add support for adding all the user'
s
messages
as
context
,
and
not
just
the
last
message
const generateChatSearchQuery = async (messageId: string) => {
const model = $models.find((model) => model.id === selectedModels[0]);
//
TODO
:
rename
titleModel
to
taskModel
-
this
is
the
model
used
for
non
-
chat
tasks
(
e
.
g
.
title
generation
,
search
query
generation
)
const
titleModelId
=
const taskModelId =
model?.external ?? false
? $settings?.title?.modelExternal ?? selectedModels[0]
: $settings?.title?.model ?? selectedModels[0];
const
t
itle
Model
=
$
models
.
find
((
model
)
=>
model
.
id
===
t
itle
ModelId
);
const t
ask
Model = $models.find((model) => model.id === t
ask
ModelId);
const userMessage = history.messages[messageId];
const userPrompt = userMessage.content;
const previousMessages = messages.filter((message) => message.role === '
user
').map((message) => message.content);
console
.
log
(
titleModel
);
return await generateSearchQuery(
localStorage.token,
t
itle
ModelId
,
t
ask
ModelId,
previousMessages,
userPrompt,
t
itle
Model
?.
external
??
false
?
t
itle
Model
?.
source
?.
toLowerCase
()
===
'litellm'
t
ask
Model?.external ?? false
? t
ask
Model?.source?.toLowerCase() === '
litellm
'
? `${LITELLM_API_BASE_URL}/v1`
: `${OPENAI_API_BASE_URL}`
: `${OLLAMA_API_BASE_URL}/v1`
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment