mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 08:07:55 +00:00
refac
This commit is contained in:
parent
aa896ba702
commit
c9f5029a9d
@ -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
|
||||||
"""
|
"""
|
||||||
|
@ -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>
|
||||||
|
@ -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": {},
|
||||||
|
@ -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}');`
|
||||||
: ''}
|
: ''}
|
||||||
/>
|
/>
|
||||||
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
@ -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
|
||||||
|
@ -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
BIN
static/static/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue
Block a user