Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
c9f5029a
Commit
c9f5029a
authored
Jul 08, 2024
by
Timothy J. Baek
Browse files
refac
parent
aa896ba7
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
10 deletions
+12
-10
backend/apps/webui/models/models.py
backend/apps/webui/models/models.py
+1
-1
backend/main.py
backend/main.py
+1
-1
backend/test/apps/webui/routers/test_models.py
backend/test/apps/webui/routers/test_models.py
+1
-1
src/lib/components/chat/MessageInput/CallOverlay.svelte
src/lib/components/chat/MessageInput/CallOverlay.svelte
+6
-4
src/lib/components/workspace/Models.svelte
src/lib/components/workspace/Models.svelte
+1
-1
src/routes/(app)/workspace/models/create/+page.svelte
src/routes/(app)/workspace/models/create/+page.svelte
+1
-1
src/routes/(app)/workspace/models/edit/+page.svelte
src/routes/(app)/workspace/models/edit/+page.svelte
+1
-1
static/static/favicon.png
static/static/favicon.png
+0
-0
No files found.
backend/apps/webui/models/models.py
View file @
c9f5029a
...
...
@@ -29,7 +29,7 @@ class ModelParams(BaseModel):
# ModelMeta is a model for the data stored in the meta field of the Model table
class
ModelMeta
(
BaseModel
):
profile_image_url
:
Optional
[
str
]
=
"/favicon.png"
profile_image_url
:
Optional
[
str
]
=
"/
static/
favicon.png"
description
:
Optional
[
str
]
=
None
"""
...
...
backend/main.py
View file @
c9f5029a
...
...
@@ -2229,7 +2229,7 @@ async def get_opensearch_xml():
<ShortName>
{
WEBUI_NAME
}
</ShortName>
<Description>Search
{
WEBUI_NAME
}
</Description>
<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
}
"
}
"/>
<moz:SearchForm>
{
WEBUI_URL
}
</moz:SearchForm>
</OpenSearchDescription>
...
...
backend/test/apps/webui/routers/test_models.py
View file @
c9f5029a
...
...
@@ -26,7 +26,7 @@ class TestModels(AbstractPostgresTest):
"base_model_id"
:
"base-model-id"
,
"name"
:
"Hello World"
,
"meta"
:
{
"profile_image_url"
:
"/favicon.png"
,
"profile_image_url"
:
"/
static/
favicon.png"
,
"description"
:
"description"
,
"capabilities"
:
None
,
"model_config"
:
{},
...
...
src/lib/components/chat/MessageInput/CallOverlay.svelte
View file @
c9f5029a
...
...
@@ -662,10 +662,11 @@
: rmsLevel * 100 > 1
? 'size-14'
: '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-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}'
);`
:
''
}
/>
...
...
@@ -743,10 +744,11 @@
: rmsLevel * 100 > 1
? 'size-[11.5rem]'
: '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-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}'
);`
:
''
}
/>
...
...
src/lib/components/workspace/Models.svelte
View file @
c9f5029a
...
...
@@ -297,7 +297,7 @@
: ''} "
>
<img
src={model?.info?.meta?.profile_image_url ?? '/favicon.png'}
src={model?.info?.meta?.profile_image_url ?? '/
static/
favicon.png'}
alt="modelfile profile"
class=" rounded-full w-full h-auto object-cover"
/>
...
...
src/routes/(app)/workspace/models/create/+page.svelte
View file @
c9f5029a
...
...
@@ -136,7 +136,7 @@
...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
? info.meta.suggestion_prompts.filter((prompt) => prompt.content !== '')
: null
...
...
src/routes/(app)/workspace/models/edit/+page.svelte
View file @
c9f5029a
...
...
@@ -46,7 +46,7 @@
base_model_id
:
null
,
name
:
''
,
meta
:
{
profile_image_url
:
'/favicon.png'
,
profile_image_url
:
'/
static/
favicon.png'
,
description
:
''
,
suggestion_prompts
:
null
,
tags
:
[]
...
...
static/static/favicon.png
0 → 100644
View file @
c9f5029a
10.7 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment