Skip to content

Commit 405fae5

Browse files
Merge branch 'open-webui:dev' into dev
2 parents a9b3c70 + 38bf0b6 commit 405fae5

13 files changed

Lines changed: 128 additions & 95 deletions

File tree

backend/open_webui/env.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ def parse_section(section):
455455
r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).{8,}$"
456456
)
457457

458+
PASSWORD_VALIDATION_HINT = os.environ.get("PASSWORD_VALIDATION_HINT", "")
459+
458460

459461
BYPASS_MODEL_ACCESS_CONTROL = (
460462
os.environ.get("BYPASS_MODEL_ACCESS_CONTROL", "False").lower() == "true"

backend/open_webui/models/knowledge.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ def search_knowledge_bases(
229229
or_(
230230
Knowledge.name.ilike(f"%{query_key}%"),
231231
Knowledge.description.ilike(f"%{query_key}%"),
232+
User.name.ilike(f"%{query_key}%"),
233+
User.email.ilike(f"%{query_key}%"),
234+
User.username.ilike(f"%{query_key}%"),
232235
)
233236
)
234237

backend/open_webui/models/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ def search_models(
294294
or_(
295295
Model.name.ilike(f"%{query_key}%"),
296296
Model.base_model_id.ilike(f"%{query_key}%"),
297+
User.name.ilike(f"%{query_key}%"),
298+
User.email.ilike(f"%{query_key}%"),
299+
User.username.ilike(f"%{query_key}%"),
297300
)
298301
)
299302

backend/open_webui/routers/auths.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ async def signup(
813813
}
814814
else:
815815
raise HTTPException(500, detail=ERROR_MESSAGES.CREATE_USER_ERROR)
816+
except HTTPException:
817+
raise
816818
except Exception as err:
817819
log.error(f"Signup error: {str(err)}")
818820
raise HTTPException(500, detail="An internal error occurred during signup.")
@@ -954,6 +956,8 @@ async def add_user(
954956
}
955957
else:
956958
raise HTTPException(500, detail=ERROR_MESSAGES.CREATE_USER_ERROR)
959+
except HTTPException:
960+
raise
957961
except Exception as err:
958962
log.error(f"Add user error: {str(err)}")
959963
raise HTTPException(

backend/open_webui/utils/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
ENABLE_PASSWORD_VALIDATION,
3434
OFFLINE_MODE,
3535
LICENSE_BLOB,
36+
PASSWORD_VALIDATION_HINT,
3637
PASSWORD_VALIDATION_REGEX_PATTERN,
3738
REDIS_KEY_PREFIX,
3839
pk,
@@ -173,7 +174,7 @@ def validate_password(password: str) -> bool:
173174

174175
if ENABLE_PASSWORD_VALIDATION:
175176
if not PASSWORD_VALIDATION_REGEX_PATTERN.match(password):
176-
raise Exception(ERROR_MESSAGES.INVALID_PASSWORD())
177+
raise Exception(ERROR_MESSAGES.INVALID_PASSWORD(PASSWORD_VALIDATION_HINT))
177178

178179
return True
179180

src/lib/components/admin/Evaluations/Feedbacks.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,11 @@
302302
<div class="flex flex-col items-start gap-0.5 h-full">
303303
<div class="flex flex-col h-full">
304304
{#if feedback.data?.sibling_model_ids}
305-
<div class="font-medium text-gray-600 dark:text-gray-400 flex-1">
305+
<Tooltip content={feedback.data?.model_id} placement="top-start">
306+
<div class="font-medium text-gray-600 dark:text-gray-400 flex-1 line-clamp-1">
306307
{feedback.data?.model_id}
307308
</div>
309+
</Tooltip>
308310

309311
<Tooltip content={feedback.data.sibling_model_ids.join(', ')}>
310312
<div class=" text-[0.65rem] text-gray-600 dark:text-gray-400 line-clamp-1">
@@ -320,11 +322,11 @@
320322
</div>
321323
</Tooltip>
322324
{:else}
323-
<div
324-
class=" text-sm font-medium text-gray-600 dark:text-gray-400 flex-1 py-1.5"
325-
>
325+
<Tooltip content={feedback.data?.model_id} placement="top-start">
326+
<div class="text-sm font-medium text-gray-600 dark:text-gray-400 flex-1 py-1.5 line-clamp-1">
326327
{feedback.data?.model_id}
327328
</div>
329+
</Tooltip>
328330
{/if}
329331
</div>
330332
</div>

src/lib/components/admin/Evaluations/Leaderboard.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@
182182
alt={model.name}
183183
class="size-5 rounded-full object-cover"
184184
/>
185-
<span class="font-medium text-gray-800 dark:text-gray-200">{model.name}</span>
185+
<Tooltip content={`${model.name} (${model.id})`} placement="top-start">
186+
<span class="font-medium text-gray-800 dark:text-gray-200 line-clamp-1">{model.name}</span>
187+
</Tooltip>
186188
</div>
187189
</td>
188190
<td class="px-3 py-1.5 text-right font-medium text-gray-900 dark:text-white">

src/lib/components/admin/Evaluations/LeaderboardModal.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { getModelHistory } from '$lib/apis/evaluations';
55
import ModelActivityChart from './ModelActivityChart.svelte';
66
import XMark from '$lib/components/icons/XMark.svelte';
7+
import Tooltip from '$lib/components/common/Tooltip.svelte';
78
89
export let show = false;
910
export let model = null;
@@ -60,9 +61,11 @@
6061
<Modal size="md" bind:show>
6162
{#if model}
6263
<div class="flex justify-between dark:text-gray-300 px-5 pt-4 pb-2">
63-
<div class="text-lg font-medium self-center">
64-
{model.name}
65-
</div>
64+
<Tooltip content={`${model.name} (${model.id})`} placement="top-start">
65+
<div class="text-lg font-medium self-center line-clamp-1">
66+
{model.name}
67+
</div>
68+
</Tooltip>
6669
<button class="self-center" on:click={close} aria-label="Close">
6770
<XMark className={'size-5'} />
6871
</button>

src/lib/components/admin/Functions.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@
8686
(selectedType !== '' ? f.type === selectedType : true) &&
8787
(query === '' ||
8888
f.name.toLowerCase().includes(query.toLowerCase()) ||
89-
f.id.toLowerCase().includes(query.toLowerCase())) &&
89+
f.id.toLowerCase().includes(query.toLowerCase()) ||
90+
(f.user?.name || '').toLowerCase().includes(query.toLowerCase()) ||
91+
(f.user?.email || '').toLowerCase().includes(query.toLowerCase()) ||
92+
(f.user?.username || '').toLowerCase().includes(query.toLowerCase())) &&
9093
(viewOption === '' ||
9194
(viewOption === 'created' && f.user_id === $user?.id) ||
9295
(viewOption === 'shared' && f.user_id !== $user?.id))

src/lib/components/admin/Settings/Models/ModelList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<div class="flex items-center gap-1">
5151
<EllipsisVertical className="size-4 cursor-move model-item-handle" />
5252

53-
<div class=" text-sm flex-1 py-1 rounded-lg">
53+
<div class=" text-sm flex-1 py-1 rounded-lg line-clamp-1">
5454
{#if $models.find((model) => model.id === modelId)}
5555
{$models.find((model) => model.id === modelId).name}
5656
{:else}

0 commit comments

Comments
 (0)