Skip to content

Commit ddb3058

Browse files
committed
chore: format
HIDE MODELS
1 parent ef73483 commit ddb3058

Some content is hidden

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

58 files changed

+618
-504
lines changed

backend/open_webui/models/chats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
log = logging.getLogger(__name__)
2121
log.setLevel(SRC_LOG_LEVELS["MODELS"])
2222

23+
2324
class Chat(Base):
2425
__tablename__ = "chat"
2526

backend/open_webui/models/functions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def get_user_valves_by_id_and_user_id(
202202

203203
return user_settings["functions"]["valves"].get(id, {})
204204
except Exception as e:
205-
log.exception(f"Error getting user values by id {id} and user id {user_id}: {e}")
205+
log.exception(
206+
f"Error getting user values by id {id} and user id {user_id}: {e}"
207+
)
206208
return None
207209

208210
def update_user_valves_by_id_and_user_id(
@@ -225,7 +227,9 @@ def update_user_valves_by_id_and_user_id(
225227

226228
return user_settings["functions"]["valves"][id]
227229
except Exception as e:
228-
log.exception(f"Error updating user valves by id {id} and user_id {user_id}: {e}")
230+
log.exception(
231+
f"Error updating user valves by id {id} and user_id {user_id}: {e}"
232+
)
229233
return None
230234

231235
def update_function_by_id(self, id: str, updated: dict) -> Optional[FunctionModel]:

backend/open_webui/models/tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ def get_user_valves_by_id_and_user_id(
204204

205205
return user_settings["tools"]["valves"].get(id, {})
206206
except Exception as e:
207-
log.exception(f"Error getting user values by id {id} and user_id {user_id}: {e}")
207+
log.exception(
208+
f"Error getting user values by id {id} and user_id {user_id}: {e}"
209+
)
208210
return None
209211

210212
def update_user_valves_by_id_and_user_id(
@@ -227,7 +229,9 @@ def update_user_valves_by_id_and_user_id(
227229

228230
return user_settings["tools"]["valves"][id]
229231
except Exception as e:
230-
log.exception(f"Error updating user valves by id {id} and user_id {user_id}: {e}")
232+
log.exception(
233+
f"Error updating user valves by id {id} and user_id {user_id}: {e}"
234+
)
231235
return None
232236

233237
def update_tool_by_id(self, id: str, updated: dict) -> Optional[ToolModel]:

backend/open_webui/retrieval/vector/dbs/milvus.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def query(self, collection_name: str, filter: dict, limit: Optional[int] = None)
202202
log.debug(all_results)
203203
return self._result_to_get_result([all_results])
204204
except Exception as e:
205-
log.exception(f"Error querying collection {collection_name} with limit {limit}: {e}")
205+
log.exception(
206+
f"Error querying collection {collection_name} with limit {limit}: {e}"
207+
)
206208
return None
207209

208210
def get(self, collection_name: str) -> Optional[GetResult]:

backend/open_webui/retrieval/vector/dbs/pgvector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ def upsert(self, collection_name: str, items: List[VectorItem]) -> None:
190190
)
191191
self.session.add(new_chunk)
192192
self.session.commit()
193-
log.info(f"Upserted {len(items)} items into collection '{collection_name}'.")
193+
log.info(
194+
f"Upserted {len(items)} items into collection '{collection_name}'."
195+
)
194196
except Exception as e:
195197
self.session.rollback()
196198
log.exception(f"Error during upsert: {e}")

backend/open_webui/routers/auths.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@
3131
)
3232
from fastapi import APIRouter, Depends, HTTPException, Request, status
3333
from fastapi.responses import RedirectResponse, Response
34-
from open_webui.config import (
35-
OPENID_PROVIDER_URL,
36-
ENABLE_OAUTH_SIGNUP,
37-
ENABLE_LDAP
38-
)
34+
from open_webui.config import OPENID_PROVIDER_URL, ENABLE_OAUTH_SIGNUP, ENABLE_LDAP
3935
from pydantic import BaseModel
4036
from open_webui.utils.misc import parse_duration, validate_email_format
4137
from open_webui.utils.auth import (

backend/open_webui/routers/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
router = APIRouter()
2424

25+
2526
@router.get("/gravatar")
2627
async def get_gravatar(email: str, user=Depends(get_verified_user)):
2728
return get_gravatar_url(email)

backend/open_webui/utils/auth.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
from open_webui.models.users import Users
1515

1616
from open_webui.constants import ERROR_MESSAGES
17-
from open_webui.env import WEBUI_SECRET_KEY, TRUSTED_SIGNATURE_KEY, STATIC_DIR, SRC_LOG_LEVELS
17+
from open_webui.env import (
18+
WEBUI_SECRET_KEY,
19+
TRUSTED_SIGNATURE_KEY,
20+
STATIC_DIR,
21+
SRC_LOG_LEVELS,
22+
)
1823

1924
from fastapi import BackgroundTasks, Depends, HTTPException, Request, Response, status
2025
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer

backend/open_webui/utils/misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
log = logging.getLogger(__name__)
1515
log.setLevel(SRC_LOG_LEVELS["MAIN"])
1616

17+
1718
def deep_update(d, u):
1819
for k, v in u.items():
1920
if isinstance(v, collections.abc.Mapping):

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"Archive All Chats": "أرشفة جميع الدردشات",
8787
"Archived Chats": "الأرشيف المحادثات",
8888
"archived-chat-export": "",
89+
"Are you sure you want to clear all memories? This action cannot be undone.": "",
8990
"Are you sure you want to delete this channel?": "",
9091
"Are you sure you want to delete this message?": "",
9192
"Are you sure you want to unarchive all archived chats?": "",
@@ -128,6 +129,7 @@
128129
"Bocha Search API Key": "",
129130
"Brave Search API Key": "مفتاح واجهة برمجة تطبيقات البحث الشجاع",
130131
"By {{name}}": "",
132+
"Bypass Embedding and Retrieval": "",
131133
"Bypass SSL verification for Websites": "تجاوز التحقق من SSL للموقع",
132134
"Calendar": "",
133135
"Call": "",
@@ -157,11 +159,11 @@
157159
"Checking for updates...": "البحث عن تحديثات",
158160
"Choose a model before saving...": "أختار موديل قبل الحفظ",
159161
"Chunk Overlap": "Chunk تداخل",
160-
"Chunk Params": "Chunk المتغيرات",
161162
"Chunk Size": "Chunk حجم",
162163
"Ciphers": "",
163164
"Citation": "اقتباس",
164165
"Clear memory": "",
166+
"Clear Memory": "",
165167
"click here": "",
166168
"Click here for filter guides.": "",
167169
"Click here for help.": "أضغط هنا للمساعدة",
@@ -209,7 +211,7 @@
209211
"Constrains effort on reasoning for reasoning models. Only applicable to reasoning models from specific providers that support reasoning effort. (Default: medium)": "",
210212
"Contact Admin for WebUI Access": "",
211213
"Content": "الاتصال",
212-
"Content Extraction": "",
214+
"Content Extraction Engine": "",
213215
"Context Length": "طول السياق",
214216
"Continue Response": "متابعة الرد",
215217
"Continue with {{provider}}": "",
@@ -246,6 +248,7 @@
246248
"Current Model": "الموديل المختار",
247249
"Current Password": "كلمة السر الحالية",
248250
"Custom": "مخصص",
251+
"Danger Zone": "",
249252
"Dark": "مظلم",
250253
"Database": "قاعدة البيانات",
251254
"December": "ديسمبر",
@@ -343,6 +346,7 @@
343346
"ElevenLabs": "",
344347
"Email": "البريد",
345348
"Embark on adventures": "",
349+
"Embedding": "",
346350
"Embedding Batch Size": "",
347351
"Embedding Model": "نموذج التضمين",
348352
"Embedding Model Engine": "تضمين محرك النموذج",
@@ -351,16 +355,12 @@
351355
"Enable autocomplete generation for chat messages": "",
352356
"Enable Code Interpreter": "",
353357
"Enable Community Sharing": "تمكين مشاركة المجتمع",
354-
"Enable Google Drive": "",
355358
"Enable Memory Locking (mlock) to prevent model data from being swapped out of RAM. This option locks the model's working set of pages into RAM, ensuring that they will not be swapped out to disk. This can help maintain performance by avoiding page faults and ensuring fast data access.": "",
356359
"Enable Memory Mapping (mmap) to load model data. This option allows the system to use disk storage as an extension of RAM by treating disk files as if they were in RAM. This can improve model performance by allowing for faster data access. However, it may not work correctly with all systems and can consume a significant amount of disk space.": "",
357360
"Enable Message Rating": "",
358361
"Enable Mirostat sampling for controlling perplexity. (Default: 0, 0 = Disabled, 1 = Mirostat, 2 = Mirostat 2.0)": "",
359362
"Enable New Sign Ups": "تفعيل عمليات التسجيل الجديدة",
360-
"Enable OneDrive": "",
361-
"Enable Web Search": "تمكين بحث الويب",
362363
"Enabled": "",
363-
"Engine": "",
364364
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "تأكد من أن ملف CSV الخاص بك يتضمن 4 أعمدة بهذا الترتيب: Name, Email, Password, Role.",
365365
"Enter {{role}} message here": "أدخل رسالة {{role}} هنا",
366366
"Enter a detail about yourself for your LLMs to recall": "ادخل معلومات عنك تريد أن يتذكرها الموديل",
@@ -572,6 +572,7 @@
572572
"Input commands": "إدخال الأوامر",
573573
"Install from Github URL": "التثبيت من عنوان URL لجيثب",
574574
"Instant Auto-Send After Voice Transcription": "",
575+
"Integration": "",
575576
"Interface": "واجهه المستخدم",
576577
"Invalid file format.": "",
577578
"Invalid Tag": "تاق غير صالحة",
@@ -619,6 +620,7 @@
619620
"Listening...": "",
620621
"Llama.cpp": "",
621622
"LLMs can make mistakes. Verify important information.": "يمكن أن تصدر بعض الأخطاء. لذلك يجب التحقق من المعلومات المهمة",
623+
"Loader": "",
622624
"Loading Kokoro.js...": "",
623625
"Local": "",
624626
"Local Models": "",
@@ -697,6 +699,7 @@
697699
"No HTML, CSS, or JavaScript content found.": "",
698700
"No inference engine with management support found": "",
699701
"No knowledge found": "",
702+
"No memories to clear": "",
700703
"No model IDs": "",
701704
"No models found": "",
702705
"No models selected": "",
@@ -797,11 +800,9 @@
797800
"Prompt updated successfully": "",
798801
"Prompts": "مطالبات",
799802
"Prompts Access": "",
800-
"Proxy URL": "",
801803
"Pull \"{{searchValue}}\" from Ollama.com": "Ollama.com \"{{searchValue}}\" أسحب من ",
802804
"Pull a model from Ollama.com": "Ollama.com سحب الموديل من ",
803805
"Query Generation Prompt": "",
804-
"Query Params": "Query Params",
805806
"RAG Template": "RAG تنمبلت",
806807
"Rating": "",
807808
"Re-rank models by topic similarity": "",
@@ -836,6 +837,7 @@
836837
"Response notifications cannot be activated as the website permissions have been denied. Please visit your browser settings to grant the necessary access.": "",
837838
"Response splitting": "",
838839
"Result": "",
840+
"Retrieval": "",
839841
"Retrieval Query Generation": "",
840842
"Rich Text Input for Chat": "",
841843
"RK": "",
@@ -1114,7 +1116,6 @@
11141116
"Warning: Jupyter execution enables arbitrary code execution, posing severe security risks—proceed with extreme caution.": "",
11151117
"Web": "Web",
11161118
"Web API": "",
1117-
"Web Loader Settings": "Web تحميل اعدادات",
11181119
"Web Search": "بحث الويب",
11191120
"Web Search Engine": "محرك بحث الويب",
11201121
"Web Search in Chat": "",
@@ -1156,5 +1157,6 @@
11561157
"Your account status is currently pending activation.": "",
11571158
"Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.": "",
11581159
"Youtube": "Youtube",
1159-
"Youtube Loader Settings": "Youtube تحميل اعدادات"
1160+
"Youtube Language": "",
1161+
"Youtube Proxy URL": ""
11601162
}

0 commit comments

Comments
 (0)