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
6c70d0f7
"src/lib/components/icons/ChatMenu.svelte" did not exist on "099b1d066bd593b3119fb7b0e850627b95548711"
Unverified
Commit
6c70d0f7
authored
Mar 02, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Mar 02, 2024
Browse files
Merge pull request #996 from open-webui/dev
0.1.107
parents
5745b9c5
96e2ee48
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
77 additions
and
33 deletions
+77
-33
src/lib/components/chat/Settings/Images.svelte
src/lib/components/chat/Settings/Images.svelte
+1
-1
src/lib/components/chat/Settings/Interface.svelte
src/lib/components/chat/Settings/Interface.svelte
+7
-5
src/lib/components/chat/Settings/Models.svelte
src/lib/components/chat/Settings/Models.svelte
+5
-5
src/lib/components/chat/SettingsModal.svelte
src/lib/components/chat/SettingsModal.svelte
+1
-1
src/lib/components/documents/AddDocModal.svelte
src/lib/components/documents/AddDocModal.svelte
+1
-1
src/lib/components/documents/EditDocModal.svelte
src/lib/components/documents/EditDocModal.svelte
+1
-1
src/lib/components/documents/Settings/General.svelte
src/lib/components/documents/Settings/General.svelte
+1
-1
src/lib/components/layout/Navbar.svelte
src/lib/components/layout/Navbar.svelte
+1
-1
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+1
-1
src/routes/(app)/+layout.svelte
src/routes/(app)/+layout.svelte
+1
-1
src/routes/(app)/+page.svelte
src/routes/(app)/+page.svelte
+10
-2
src/routes/(app)/admin/+page.svelte
src/routes/(app)/admin/+page.svelte
+8
-2
src/routes/(app)/c/[id]/+page.svelte
src/routes/(app)/c/[id]/+page.svelte
+11
-1
src/routes/(app)/documents/+page.svelte
src/routes/(app)/documents/+page.svelte
+8
-2
src/routes/(app)/modelfiles/+page.svelte
src/routes/(app)/modelfiles/+page.svelte
+8
-2
src/routes/(app)/modelfiles/create/+page.svelte
src/routes/(app)/modelfiles/create/+page.svelte
+1
-1
src/routes/(app)/modelfiles/edit/+page.svelte
src/routes/(app)/modelfiles/edit/+page.svelte
+1
-1
src/routes/(app)/prompts/+page.svelte
src/routes/(app)/prompts/+page.svelte
+8
-2
src/routes/(app)/prompts/create/+page.svelte
src/routes/(app)/prompts/create/+page.svelte
+1
-1
src/routes/(app)/prompts/edit/+page.svelte
src/routes/(app)/prompts/edit/+page.svelte
+1
-1
No files found.
src/lib/components/chat/Settings/Images.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { createEventDispatcher, onMount } from 'svelte';
import { createEventDispatcher, onMount } from 'svelte';
import { config, user } from '$lib/stores';
import { config, user } from '$lib/stores';
...
...
src/lib/components/chat/Settings/Interface.svelte
View file @
6c70d0f7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import { setDefaultPromptSuggestions } from '$lib/apis/configs';
import { setDefaultPromptSuggestions } from '$lib/apis/configs';
import { config, models, user } from '$lib/stores';
import { config, models, user } from '$lib/stores';
import { createEventDispatcher, onMount } from 'svelte';
import { createEventDispatcher, onMount } from 'svelte';
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher();
export let saveSettings: Function;
export let saveSettings: Function;
...
@@ -191,10 +191,12 @@
...
@@ -191,10 +191,12 @@
placeholder="Select a model"
placeholder="Select a model"
>
>
<option value="" selected>Current Model</option>
<option value="" selected>Current Model</option>
{#each $models.filter((m) => m.size != null) as model}
{#each $models as model}
<option value={model.name} class="bg-gray-100 dark:bg-gray-700"
{#if model.size != null}
>{model.name + ' (' + (model.size / 1024 ** 3).toFixed(1) + ' GB)'}</option
<option value={model.name} class="bg-gray-100 dark:bg-gray-700">
>
{model.name + ' (' + (model.size / 1024 ** 3).toFixed(1) + ' GB)'}
</option>
{/if}
{/each}
{/each}
</select>
</select>
</div>
</div>
...
...
src/lib/components/chat/Settings/Models.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import queue from 'async/queue';
import queue from 'async/queue';
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { createModel, deleteModel, getOllamaVersion, pullModel } from '$lib/apis/ollama';
import { createModel, deleteModel, getOllamaVersion, pullModel } from '$lib/apis/ollama';
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
...
@@ -432,7 +432,7 @@
...
@@ -432,7 +432,7 @@
<div class="mt-2 mb-1 text-xs text-gray-400 dark:text-gray-500">
<div class="mt-2 mb-1 text-xs text-gray-400 dark:text-gray-500">
To access the available model names for downloading, <a
To access the available model names for downloading, <a
class=" text-gray-500 dark:text-gray-300 font-medium"
class=" text-gray-500 dark:text-gray-300 font-medium
underline
"
href="https://ollama.com/library"
href="https://ollama.com/library"
target="_blank">click here.</a
target="_blank">click here.</a
>
>
...
@@ -651,7 +651,7 @@
...
@@ -651,7 +651,7 @@
{/if}
{/if}
<div class=" mt-1 text-xs text-gray-400 dark:text-gray-500">
<div class=" mt-1 text-xs text-gray-400 dark:text-gray-500">
To access the GGUF models available for downloading, <a
To access the GGUF models available for downloading, <a
class=" text-gray-500 dark:text-gray-300 font-medium"
class=" text-gray-500 dark:text-gray-300 font-medium
underline
"
href="https://huggingface.co/models?search=gguf"
href="https://huggingface.co/models?search=gguf"
target="_blank">click here.</a
target="_blank">click here.</a
>
>
...
@@ -790,7 +790,7 @@
...
@@ -790,7 +790,7 @@
<div class="mb-2 text-xs text-gray-400 dark:text-gray-500">
<div class="mb-2 text-xs text-gray-400 dark:text-gray-500">
Not sure what to add?
Not sure what to add?
<a
<a
class=" text-gray-300 font-medium"
class=" text-gray-300 font-medium
underline
"
href="https://litellm.vercel.app/docs/proxy/configs#quick-start"
href="https://litellm.vercel.app/docs/proxy/configs#quick-start"
target="_blank"
target="_blank"
>
>
...
@@ -913,7 +913,7 @@
...
@@ -913,7 +913,7 @@
<div class="mt-2 text-xs text-gray-400 dark:text-gray-500">
<div class="mt-2 text-xs text-gray-400 dark:text-gray-500">
Not sure what to add?
Not sure what to add?
<a
<a
class=" text-gray-300 font-medium"
class=" text-gray-300 font-medium
underline
"
href="https://litellm.vercel.app/docs/proxy/configs#quick-start"
href="https://litellm.vercel.app/docs/proxy/configs#quick-start"
target="_blank"
target="_blank"
>
>
...
...
src/lib/components/chat/SettingsModal.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { models, settings, user } from '$lib/stores';
import { models, settings, user } from '$lib/stores';
import { getOllamaModels } from '$lib/apis/ollama';
import { getOllamaModels } from '$lib/apis/ollama';
...
...
src/lib/components/documents/AddDocModal.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import dayjs from 'dayjs';
import dayjs from 'dayjs';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
...
...
src/lib/components/documents/EditDocModal.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import dayjs from 'dayjs';
import dayjs from 'dayjs';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
...
...
src/lib/components/documents/Settings/General.svelte
View file @
6c70d0f7
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
} from '$lib/apis/rag';
} from '$lib/apis/rag';
import { documents } from '$lib/stores';
import { documents } from '$lib/stores';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
export let saveHandler: Function;
export let saveHandler: Function;
...
...
src/lib/components/layout/Navbar.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import fileSaver from 'file-saver';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
const { saveAs } = fileSaver;
...
...
src/lib/components/layout/Sidebar.svelte
View file @
6c70d0f7
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
updateChatById,
updateChatById,
getAllChatTags
getAllChatTags
} from '$lib/apis/chats';
} from '$lib/apis/chats';
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { slide } from 'svelte/transition';
import { slide } from 'svelte/transition';
import { WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_BASE_URL } from '$lib/constants';
...
...
src/routes/(app)/+layout.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { openDB, deleteDB } from 'idb';
import { openDB, deleteDB } from 'idb';
import fileSaver from 'file-saver';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
const { saveAs } = fileSaver;
...
...
src/routes/(app)/+page.svelte
View file @
6c70d0f7
<
script
lang
=
"ts"
>
<
script
lang
=
"ts"
>
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
toast
from
'svelte-
french-toast
'
;
import
{
toast
}
from
'svelte-
sonner
'
;
import
{
onMount
,
tick
}
from
'svelte'
;
import
{
onMount
,
tick
}
from
'svelte'
;
import
{
goto
}
from
'$app/navigation'
;
import
{
goto
}
from
'$app/navigation'
;
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
chats
,
chats
,
chatId
,
chatId
,
config
,
config
,
WEBUI_NAME
,
tags
as
_tags
tags
as
_tags
}
from
'$lib/stores'
;
}
from
'$lib/stores'
;
import
{
copyToClipboard
,
splitStream
}
from
'$lib/utils'
;
import
{
copyToClipboard
,
splitStream
}
from
'$lib/utils'
;
...
@@ -38,7 +39,6 @@
...
@@ -38,7 +39,6 @@
import
{
RAGTemplate
}
from
'$lib/utils/rag'
;
import
{
RAGTemplate
}
from
'$lib/utils/rag'
;
import
{
LITELLM_API_BASE_URL
,
OPENAI_API_BASE_URL
}
from
'$lib/constants'
;
import
{
LITELLM_API_BASE_URL
,
OPENAI_API_BASE_URL
}
from
'$lib/constants'
;
import
{
WEBUI_BASE_URL
}
from
'$lib/constants'
;
import
{
WEBUI_BASE_URL
}
from
'$lib/constants'
;
let
stopResponseFlag
=
false
;
let
stopResponseFlag
=
false
;
let
autoScroll
=
true
;
let
autoScroll
=
true
;
let
processing
=
''
;
let
processing
=
''
;
...
@@ -809,6 +809,14 @@
...
@@ -809,6 +809,14 @@
};
};
</
script
>
</
script
>
<
svelte
:
head
>
<
title
>
{
title
?
`${
title
.
length
>
30
?
`${
title
.
slice
(
0
,
30
)}...`
:
title
}
|
${$
WEBUI_NAME
}`
:
`${$
WEBUI_NAME
}`}
</
title
>
</
svelte
:
head
>
<
div
class
=
"h-screen max-h-[100dvh] w-full flex flex-col"
>
<
div
class
=
"h-screen max-h-[100dvh] w-full flex flex-col"
>
<
Navbar
{
title
}
shareEnabled
={
messages
.
length
>
0
}
{
initNewChat
}
{
tags
}
{
addTag
}
{
deleteTag
}
/>
<
Navbar
{
title
}
shareEnabled
={
messages
.
length
>
0
}
{
initNewChat
}
{
tags
}
{
addTag
}
{
deleteTag
}
/>
<
div
class
=
"flex flex-col flex-auto"
>
<
div
class
=
"flex flex-col flex-auto"
>
...
...
src/routes/(app)/admin/+page.svelte
View file @
6c70d0f7
<script>
<script>
import { WEBUI_API_BASE_URL } from '$lib/constants';
import { WEBUI_API_BASE_URL } from '$lib/constants';
import { config, user } from '$lib/stores';
import {
WEBUI_NAME,
config, user } from '$lib/stores';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { updateUserRole, getUsers, deleteUserById } from '$lib/apis/users';
import { updateUserRole, getUsers, deleteUserById } from '$lib/apis/users';
import { getSignUpEnabledStatus, toggleSignUpEnabledStatus } from '$lib/apis/auths';
import { getSignUpEnabledStatus, toggleSignUpEnabledStatus } from '$lib/apis/auths';
...
@@ -61,6 +61,12 @@
...
@@ -61,6 +61,12 @@
});
});
</script>
</script>
<svelte:head>
<title>
{`Admin Panel | ${$WEBUI_NAME}`}
</title>
</svelte:head>
{#key selectedUser}
{#key selectedUser}
<EditUserModal
<EditUserModal
bind:show={showEditUserModal}
bind:show={showEditUserModal}
...
...
src/routes/(app)/c/[id]/+page.svelte
View file @
6c70d0f7
<
script
lang
=
"ts"
>
<
script
lang
=
"ts"
>
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
toast
from
'svelte-
french-toast
'
;
import
{
toast
}
from
'svelte-
sonner
'
;
import
{
onMount
,
tick
}
from
'svelte'
;
import
{
onMount
,
tick
}
from
'svelte'
;
import
{
goto
}
from
'$app/navigation'
;
import
{
goto
}
from
'$app/navigation'
;
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
chats
,
chats
,
chatId
,
chatId
,
config
,
config
,
WEBUI_NAME
,
tags
as
_tags
tags
as
_tags
}
from
'$lib/stores'
;
}
from
'$lib/stores'
;
import
{
copyToClipboard
,
splitStream
,
convertMessagesToHistory
}
from
'$lib/utils'
;
import
{
copyToClipboard
,
splitStream
,
convertMessagesToHistory
}
from
'$lib/utils'
;
...
@@ -100,6 +101,7 @@
...
@@ -100,6 +101,7 @@
await
tick
();
await
tick
();
loaded
=
true
;
loaded
=
true
;
window
.
setTimeout
(()
=>
scrollToBottom
(),
0
);
const
chatInput
=
document
.
getElementById
(
'chat-textarea'
);
const
chatInput
=
document
.
getElementById
(
'chat-textarea'
);
chatInput
?.
focus
();
chatInput
?.
focus
();
}
else
{
}
else
{
...
@@ -823,6 +825,14 @@
...
@@ -823,6 +825,14 @@
});
});
</
script
>
</
script
>
<
svelte
:
head
>
<
title
>
{
title
?
`${
title
.
length
>
30
?
`${
title
.
slice
(
0
,
30
)}...`
:
title
}
|
${$
WEBUI_NAME
}`
:
`${$
WEBUI_NAME
}`}
</
title
>
</
svelte
:
head
>
{#
if
loaded
}
{#
if
loaded
}
<
div
class
=
"min-h-screen max-h-screen w-full flex flex-col"
>
<
div
class
=
"min-h-screen max-h-screen w-full flex flex-col"
>
<
Navbar
<
Navbar
...
...
src/routes/(app)/documents/+page.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import fileSaver from 'file-saver';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
const { saveAs } = fileSaver;
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import { documents } from '$lib/stores';
import {
WEBUI_NAME,
documents } from '$lib/stores';
import { createNewDoc, deleteDocByName, getDocs } from '$lib/apis/documents';
import { createNewDoc, deleteDocByName, getDocs } from '$lib/apis/documents';
import { SUPPORTED_FILE_TYPE, SUPPORTED_FILE_EXTENSIONS } from '$lib/constants';
import { SUPPORTED_FILE_TYPE, SUPPORTED_FILE_EXTENSIONS } from '$lib/constants';
...
@@ -148,6 +148,12 @@
...
@@ -148,6 +148,12 @@
);
);
</script>
</script>
<svelte:head>
<title>
{`Documents | ${$WEBUI_NAME}`}
</title>
</svelte:head>
{#if dragged}
{#if dragged}
<div
<div
class="fixed w-full h-full flex z-50 touch-none pointer-events-none"
class="fixed w-full h-full flex z-50 touch-none pointer-events-none"
...
...
src/routes/(app)/modelfiles/+page.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import fileSaver from 'file-saver';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
const { saveAs } = fileSaver;
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import { modelfiles, settings, user } from '$lib/stores';
import {
WEBUI_NAME,
modelfiles, settings, user } from '$lib/stores';
import { createModel, deleteModel } from '$lib/apis/ollama';
import { createModel, deleteModel } from '$lib/apis/ollama';
import {
import {
createNewModelfile,
createNewModelfile,
...
@@ -69,6 +69,12 @@
...
@@ -69,6 +69,12 @@
});
});
</script>
</script>
<svelte:head>
<title>
{`Modelfiles | ${$WEBUI_NAME}`}
</title>
</svelte:head>
<div class="min-h-screen max-h-[100dvh] w-full flex justify-center dark:text-white">
<div class="min-h-screen max-h-[100dvh] w-full flex justify-center dark:text-white">
<div class="flex flex-col justify-between w-full overflow-y-auto">
<div class="flex flex-col justify-between w-full overflow-y-auto">
<div class="max-w-2xl mx-auto w-full px-3 md:px-0 my-10">
<div class="max-w-2xl mx-auto w-full px-3 md:px-0 my-10">
...
...
src/routes/(app)/modelfiles/create/+page.svelte
View file @
6c70d0f7
<script>
<script>
import { v4 as uuidv4 } from 'uuid';
import { v4 as uuidv4 } from 'uuid';
import { toast } from 'svelte-
french-toast
';
import { toast } from 'svelte-
sonner
';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { settings, user, config, modelfiles, models } from '$lib/stores';
import { settings, user, config, modelfiles, models } from '$lib/stores';
...
...
src/routes/(app)/modelfiles/edit/+page.svelte
View file @
6c70d0f7
<script>
<script>
import { v4 as uuidv4 } from 'uuid';
import { v4 as uuidv4 } from 'uuid';
import { toast } from 'svelte-
french-toast
';
import { toast } from 'svelte-
sonner
';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
...
...
src/routes/(app)/prompts/+page.svelte
View file @
6c70d0f7
<script lang="ts">
<script lang="ts">
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import fileSaver from 'file-saver';
import fileSaver from 'file-saver';
const { saveAs } = fileSaver;
const { saveAs } = fileSaver;
import { onMount } from 'svelte';
import { onMount } from 'svelte';
import { prompts } from '$lib/stores';
import {
WEBUI_NAME,
prompts } from '$lib/stores';
import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts';
import { createNewPrompt, deletePromptByCommand, getPrompts } from '$lib/apis/prompts';
import { error } from '@sveltejs/kit';
import { error } from '@sveltejs/kit';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
...
@@ -36,6 +36,12 @@
...
@@ -36,6 +36,12 @@
};
};
</script>
</script>
<svelte:head>
<title>
{`Prompts | ${$WEBUI_NAME}`}
</title>
</svelte:head>
<div class="min-h-screen max-h-[100dvh] w-full flex justify-center dark:text-white">
<div class="min-h-screen max-h-[100dvh] w-full flex justify-center dark:text-white">
<div class="flex flex-col justify-between w-full overflow-y-auto">
<div class="flex flex-col justify-between w-full overflow-y-auto">
<div class="max-w-2xl mx-auto w-full px-3 md:px-0 my-10">
<div class="max-w-2xl mx-auto w-full px-3 md:px-0 my-10">
...
...
src/routes/(app)/prompts/create/+page.svelte
View file @
6c70d0f7
<script>
<script>
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { prompts } from '$lib/stores';
import { prompts } from '$lib/stores';
...
...
src/routes/(app)/prompts/edit/+page.svelte
View file @
6c70d0f7
<script>
<script>
import toast from 'svelte-
french-toast
';
import
{
toast
}
from 'svelte-
sonner
';
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { prompts } from '$lib/stores';
import { prompts } from '$lib/stores';
...
...
Prev
1
2
3
Next
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