forked from open-webui/open-webui
feat: litellm frontend integration
This commit is contained in:
parent
de0084c8df
commit
9b6dca3d7f
8 changed files with 134 additions and 62 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { getOllamaModels } from '$lib/apis/ollama';
|
||||
import { getOpenAIModels } from '$lib/apis/openai';
|
||||
import { getLiteLLMModels } from '$lib/apis/litellm';
|
||||
|
||||
import Modal from '../common/Modal.svelte';
|
||||
import Account from './Settings/Account.svelte';
|
||||
|
@ -41,7 +42,15 @@
|
|||
console.log(error);
|
||||
return null;
|
||||
});
|
||||
|
||||
models.push(...(openAIModels ? [{ name: 'hr' }, ...openAIModels] : []));
|
||||
|
||||
const liteLLMModels = await getLiteLLMModels(localStorage.token).catch((error) => {
|
||||
console.log(error);
|
||||
return null;
|
||||
});
|
||||
|
||||
models.push(...(liteLLMModels ? [{ name: 'hr' }, ...liteLLMModels] : []));
|
||||
}
|
||||
|
||||
return models;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue