feat: litellm frontend integration
This commit is contained in:
1 parent
de0084c8df
commit
9b6dca3d7f
8 files changed
+134
-62
No files matched your search
@@ -12,6 +12,7 @@
|
||||
import { getPrompts } from '$lib/apis/prompts';
|
||||
|
||||
import { getOpenAIModels } from '$lib/apis/openai';
|
||||
import { getLiteLLMModels } from '$lib/apis/litellm';
|
||||
|
||||
import {
|
||||
user,
|
||||
@@ -59,6 +60,13 @@
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user