This commit is contained in:
Timothy J. Baek 2024-07-08 23:07:23 -07:00
parent aa896ba702
commit c9f5029a9d
8 changed files with 12 additions and 10 deletions

View File

@ -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
""" """

View File

@ -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>

View File

@ -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": {},

View File

@ -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}');`
: ''} : ''}
/> />

View File

@ -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"
/> />

View File

@ -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

View File

@ -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: []

BIN
static/static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB