Skip to content

Commit eb56869

Browse files
committed
chore: format
1 parent 7ff7199 commit eb56869

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+57
-54
lines changed

backend/open_webui/utils/misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ def openai_chat_chunk_message_template(
217217

218218

219219
def openai_chat_completion_message_template(
220-
model: str,
220+
model: str,
221221
message: Optional[str] = None,
222222
tool_calls: Optional[list[dict]] = None,
223-
usage: Optional[dict] = None
223+
usage: Optional[dict] = None,
224224
) -> dict:
225225
template = openai_chat_message_template(model)
226226
template["object"] = "chat.completion"

backend/open_webui/utils/response.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ def convert_ollama_tool_call_to_openai(tool_calls: dict) -> dict:
1616
"function": {
1717
"name": tool_call.get("function", {}).get("name", ""),
1818
"arguments": json.dumps(
19-
tool_call.get('function', {}).get('arguments', {})
19+
tool_call.get("function", {}).get("arguments", {})
2020
),
2121
},
2222
}
2323
openai_tool_calls.append(openai_tool_call)
2424
return openai_tool_calls
2525

26+
2627
def convert_response_ollama_to_openai(ollama_response: dict) -> dict:
2728
model = ollama_response.get("model", "ollama")
2829
message_content = ollama_response.get("message", {}).get("content", "")
@@ -73,7 +74,9 @@ def convert_response_ollama_to_openai(ollama_response: dict) -> dict:
7374
),
7475
}
7576

76-
response = openai_chat_completion_message_template(model, message_content, openai_tool_calls, usage)
77+
response = openai_chat_completion_message_template(
78+
model, message_content, openai_tool_calls, usage
79+
)
7780
return response
7881

7982

src/lib/components/chat/Settings/Connections.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
{$i18n.t('Connect to your own OpenAI compatible API endpoints.')}
131131
<br />
132132
{$i18n.t(
133-
'Ensure that CORS is properly configured to allow requests from Open WebUI.'
133+
'CORS must be properly configured by the provider to allow requests from Open WebUI.'
134134
)}
135135
</div>
136136
</div>

src/lib/i18n/locales/ar-BH/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "أنسخ الرابط",
221221
"Copy to clipboard": "",
222222
"Copying to clipboard was successful!": "تم النسخ إلى الحافظة بنجاح",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "",
224225
"Create a knowledge base": "",
225226
"Create a model": "إنشاء نموذج",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "تمكين بحث الويب",
346347
"Enabled": "",
347348
"Engine": "",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "تأكد من أن ملف CSV الخاص بك يتضمن 4 أعمدة بهذا الترتيب: Name, Email, Password, Role.",
350350
"Enter {{role}} message here": "أدخل رسالة {{role}} هنا",
351351
"Enter a detail about yourself for your LLMs to recall": "ادخل معلومات عنك تريد أن يتذكرها الموديل",

src/lib/i18n/locales/bg-BG/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "Копиране на връзка",
221221
"Copy to clipboard": "",
222222
"Copying to clipboard was successful!": "Копирането в клипборда беше успешно!",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "",
224225
"Create a knowledge base": "",
225226
"Create a model": "Създаване на модел",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "Разрешаване на търсене в уеб",
346347
"Enabled": "",
347348
"Engine": "",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Уверете се, че вашият CSV файл включва 4 колони в следния ред: Име, Имейл, Парола, Роля.",
350350
"Enter {{role}} message here": "Въведете съобщение за {{role}} тук",
351351
"Enter a detail about yourself for your LLMs to recall": "Въведете подробности за себе си, за да се herinnerат вашите LLMs",

src/lib/i18n/locales/bn-BD/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "লিংক কপি করুন",
221221
"Copy to clipboard": "",
222222
"Copying to clipboard was successful!": "ক্লিপবোর্ডে কপি করা সফল হয়েছে",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "",
224225
"Create a knowledge base": "",
225226
"Create a model": "একটি মডেল তৈরি করুন",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "ওয়েব অনুসন্ধান সক্ষম করুন",
346347
"Enabled": "",
347348
"Engine": "",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "আপনার সিএসভি ফাইলটিতে এই ক্রমে 4 টি কলাম অন্তর্ভুক্ত রয়েছে তা নিশ্চিত করুন: নাম, ইমেল, পাসওয়ার্ড, ভূমিকা।.",
350350
"Enter {{role}} message here": "{{role}} মেসেজ এখানে লিখুন",
351351
"Enter a detail about yourself for your LLMs to recall": "আপনার এলএলএমগুলি স্মরণ করার জন্য নিজের সম্পর্কে একটি বিশদ লিখুন",

src/lib/i18n/locales/ca-ES/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "Copiar l'enllaç",
221221
"Copy to clipboard": "Copiar al porta-retalls",
222222
"Copying to clipboard was successful!": "La còpia al porta-retalls s'ha realitzat correctament",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "Crear",
224225
"Create a knowledge base": "Crear una base de coneixement",
225226
"Create a model": "Crear un model",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "Activar la cerca web",
346347
"Enabled": "Habilitat",
347348
"Engine": "Motor",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Assegura't que els teus fitxers CSV inclouen 4 columnes en aquest ordre: Nom, Correu electrònic, Contrasenya, Rol.",
350350
"Enter {{role}} message here": "Introdueix aquí el missatge de {{role}}",
351351
"Enter a detail about yourself for your LLMs to recall": "Introdueix un detall sobre tu què els teus models de llenguatge puguin recordar",

src/lib/i18n/locales/ceb-PH/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "",
221221
"Copy to clipboard": "",
222222
"Copying to clipboard was successful!": "Ang pagkopya sa clipboard malampuson!",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "",
224225
"Create a knowledge base": "",
225226
"Create a model": "",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "",
346347
"Enabled": "",
347348
"Engine": "",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "",
350350
"Enter {{role}} message here": "Pagsulod sa mensahe {{role}} dinhi",
351351
"Enter a detail about yourself for your LLMs to recall": "",

src/lib/i18n/locales/cs-CZ/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "Kopírovat odkaz",
221221
"Copy to clipboard": "Kopírovat do schránky",
222222
"Copying to clipboard was successful!": "Kopírování do schránky bylo úspěšné!",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "Vytvořit",
224225
"Create a knowledge base": "Vytvořit knowledge base",
225226
"Create a model": "Vytvořte model",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "Povolit webové vyhledávání",
346347
"Enabled": "Povoleno",
347348
"Engine": "Engine",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Ujistěte se, že váš CSV soubor obsahuje 4 sloupce v tomto pořadí: Name, Email, Password, Role.",
350350
"Enter {{role}} message here": "Zadejte zprávu {{role}} sem",
351351
"Enter a detail about yourself for your LLMs to recall": "Zadejte podrobnost o sobě, kterou si vaše LLM mají pamatovat.",

src/lib/i18n/locales/da-DK/translation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
"Copy Link": "Kopier link",
221221
"Copy to clipboard": "",
222222
"Copying to clipboard was successful!": "Kopieret til udklipsholder!",
223+
"CORS must be properly configured by the provider to allow requests from Open WebUI.": "",
223224
"Create": "",
224225
"Create a knowledge base": "",
225226
"Create a model": "Lav en model",
@@ -345,7 +346,6 @@
345346
"Enable Web Search": "Aktiver websøgning",
346347
"Enabled": "Aktiveret",
347348
"Engine": "engine",
348-
"Ensure that CORS is properly configured to allow requests from Open WebUI.": "",
349349
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "Sørg for at din CSV-fil indeholder 4 kolonner in denne rækkefølge: Name, Email, Password, Role.",
350350
"Enter {{role}} message here": "Indtast {{role}} besked her",
351351
"Enter a detail about yourself for your LLMs to recall": "Indtast en detalje om dig selv, som dine LLMs kan huske",

0 commit comments

Comments
 (0)