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
f0da5b9e
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "66342140a397d8966ea8f7f08e6c43316d4ab5e2"
Commit
f0da5b9e
authored
Apr 27, 2024
by
Timothy J. Baek
Browse files
refac
parent
9ef843d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
src/routes/(app)/+layout.svelte
src/routes/(app)/+layout.svelte
+4
-23
No files found.
src/routes/(app)/+layout.svelte
View file @
f0da5b9e
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
import { goto } from '$app/navigation';
import { goto } from '$app/navigation';
import { getOllamaModels, getOllamaVersion } from '$lib/apis/ollama';
import { getModels as _getModels } from '$lib/utils';
import { getOllamaVersion } from '$lib/apis/ollama';
import { getModelfiles } from '$lib/apis/modelfiles';
import { getModelfiles } from '$lib/apis/modelfiles';
import { getPrompts } from '$lib/apis/prompts';
import { getPrompts } from '$lib/apis/prompts';
import { getOpenAIModels } from '$lib/apis/openai';
import { getLiteLLMModels } from '$lib/apis/litellm';
import { getDocs } from '$lib/apis/documents';
import { getDocs } from '$lib/apis/documents';
import { getAllChatTags } from '$lib/apis/chats';
import { getAllChatTags } from '$lib/apis/chats';
...
@@ -47,26 +47,7 @@
...
@@ -47,26 +47,7 @@
let showShortcuts = false;
let showShortcuts = false;
const getModels = async () => {
const getModels = async () => {
let models = await Promise.all([
return _getModels(localStorage.token);
await getOllamaModels(localStorage.token).catch((error) => {
console.log(error);
return null;
}),
await getOpenAIModels(localStorage.token).catch((error) => {
console.log(error);
return null;
}),
await getLiteLLMModels(localStorage.token).catch((error) => {
console.log(error);
return null;
})
]);
models = models
.filter((models) => models)
.reduce((a, e, i, arr) => a.concat(e, ...(i < arr.length - 1 ? [{ name: 'hr' }] : [])), []);
return models;
};
};
const setOllamaVersion = async (version: string = '') => {
const setOllamaVersion = async (version: string = '') => {
...
...
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