Timothy J. Baek 9 月之前
父节点
当前提交
c9f5029a9d

+ 1 - 1
backend/apps/webui/models/models.py

@@ -29,7 +29,7 @@ class ModelParams(BaseModel):
 
 
 # ModelMeta is a model for the data stored in the meta field of the Model table
 # ModelMeta is a model for the data stored in the meta field of the Model table
 class ModelMeta(BaseModel):
 class ModelMeta(BaseModel):
-    profile_image_url: Optional[str] = "/favicon.png"
+    profile_image_url: Optional[str] = "/static/favicon.png"
 
 
     description: Optional[str] = None
     description: Optional[str] = None
     """
     """

+ 1 - 1
backend/main.py

@@ -2229,7 +2229,7 @@ async def get_opensearch_xml():
     <ShortName>{WEBUI_NAME}</ShortName>
     <ShortName>{WEBUI_NAME}</ShortName>
     <Description>Search {WEBUI_NAME}</Description>
     <Description>Search {WEBUI_NAME}</Description>
     <InputEncoding>UTF-8</InputEncoding>
     <InputEncoding>UTF-8</InputEncoding>
-    <Image width="16" height="16" type="image/x-icon">{WEBUI_URL}/favicon.png</Image>
+    <Image width="16" height="16" type="image/x-icon">{WEBUI_URL}/static/favicon.png</Image>
     <Url type="text/html" method="get" template="{WEBUI_URL}/?q={"{searchTerms}"}"/>
     <Url type="text/html" method="get" template="{WEBUI_URL}/?q={"{searchTerms}"}"/>
     <moz:SearchForm>{WEBUI_URL}</moz:SearchForm>
     <moz:SearchForm>{WEBUI_URL}</moz:SearchForm>
     </OpenSearchDescription>
     </OpenSearchDescription>

+ 1 - 1
backend/test/apps/webui/routers/test_models.py

@@ -26,7 +26,7 @@ class TestModels(AbstractPostgresTest):
                     "base_model_id": "base-model-id",
                     "base_model_id": "base-model-id",
                     "name": "Hello World",
                     "name": "Hello World",
                     "meta": {
                     "meta": {
-                        "profile_image_url": "/favicon.png",
+                        "profile_image_url": "/static/favicon.png",
                         "description": "description",
                         "description": "description",
                         "capabilities": None,
                         "capabilities": None,
                         "model_config": {},
                         "model_config": {},

+ 6 - 4
src/lib/components/chat/MessageInput/CallOverlay.svelte

@@ -662,10 +662,11 @@
 									: rmsLevel * 100 > 1
 									: rmsLevel * 100 > 1
 									? 'size-14'
 									? 'size-14'
 									: 'size-12'}  transition-all rounded-full {(model?.info?.meta
 									: 'size-12'}  transition-all rounded-full {(model?.info?.meta
-									?.profile_image_url ?? '/favicon.png') !== '/favicon.png'
+									?.profile_image_url ?? '/static/favicon.png') !== '/static/favicon.png'
 									? ' bg-cover bg-center bg-no-repeat'
 									? ' bg-cover bg-center bg-no-repeat'
 									: 'bg-black dark:bg-white'}  bg-black dark:bg-white"
 									: 'bg-black dark:bg-white'}  bg-black dark:bg-white"
-								style={(model?.info?.meta?.profile_image_url ?? '/favicon.png') !== '/favicon.png'
+								style={(model?.info?.meta?.profile_image_url ?? '/static/favicon.png') !==
+								'/static/favicon.png'
 									? `background-image: url('${model?.info?.meta?.profile_image_url}');`
 									? `background-image: url('${model?.info?.meta?.profile_image_url}');`
 									: ''}
 									: ''}
 							/>
 							/>
@@ -743,10 +744,11 @@
 										: rmsLevel * 100 > 1
 										: rmsLevel * 100 > 1
 										? 'size-[11.5rem]'
 										? 'size-[11.5rem]'
 										: 'size-44'}  transition-all rounded-full {(model?.info?.meta
 										: 'size-44'}  transition-all rounded-full {(model?.info?.meta
-										?.profile_image_url ?? '/favicon.png') !== '/favicon.png'
+										?.profile_image_url ?? '/static/favicon.png') !== '/static/favicon.png'
 										? ' bg-cover bg-center bg-no-repeat'
 										? ' bg-cover bg-center bg-no-repeat'
 										: 'bg-black dark:bg-white'} "
 										: 'bg-black dark:bg-white'} "
-									style={(model?.info?.meta?.profile_image_url ?? '/favicon.png') !== '/favicon.png'
+									style={(model?.info?.meta?.profile_image_url ?? '/static/favicon.png') !==
+									'/static/favicon.png'
 										? `background-image: url('${model?.info?.meta?.profile_image_url}');`
 										? `background-image: url('${model?.info?.meta?.profile_image_url}');`
 										: ''}
 										: ''}
 								/>
 								/>

+ 1 - 1
src/lib/components/workspace/Models.svelte

@@ -297,7 +297,7 @@
 							: ''} "
 							: ''} "
 					>
 					>
 						<img
 						<img
-							src={model?.info?.meta?.profile_image_url ?? '/favicon.png'}
+							src={model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
 							alt="modelfile profile"
 							alt="modelfile profile"
 							class=" rounded-full w-full h-auto object-cover"
 							class=" rounded-full w-full h-auto object-cover"
 						/>
 						/>

+ 1 - 1
src/routes/(app)/workspace/models/create/+page.svelte

@@ -136,7 +136,7 @@
 				...info,
 				...info,
 				meta: {
 				meta: {
 					...info.meta,
 					...info.meta,
-					profile_image_url: info.meta.profile_image_url ?? '/favicon.png',
+					profile_image_url: info.meta.profile_image_url ?? '/static/favicon.png',
 					suggestion_prompts: info.meta.suggestion_prompts
 					suggestion_prompts: info.meta.suggestion_prompts
 						? info.meta.suggestion_prompts.filter((prompt) => prompt.content !== '')
 						? info.meta.suggestion_prompts.filter((prompt) => prompt.content !== '')
 						: null
 						: null

+ 1 - 1
src/routes/(app)/workspace/models/edit/+page.svelte

@@ -46,7 +46,7 @@
 		base_model_id: null,
 		base_model_id: null,
 		name: '',
 		name: '',
 		meta: {
 		meta: {
-			profile_image_url: '/favicon.png',
+			profile_image_url: '/static/favicon.png',
 			description: '',
 			description: '',
 			suggestion_prompts: null,
 			suggestion_prompts: null,
 			tags: []
 			tags: []

二进制
static/static/favicon.png