mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-17 23:38:30 +00:00
feat(providers): fix loading issues
This commit is contained in:
@ -5,6 +5,8 @@ import logger from '../../utils/logger';
|
||||
export const loadOpenAIChatModels = async () => {
|
||||
const openAIApiKey = getOpenaiApiKey();
|
||||
|
||||
if (!openAIApiKey) return {};
|
||||
|
||||
try {
|
||||
const chatModels = {
|
||||
'GPT-3.5 turbo': new ChatOpenAI({
|
||||
@ -36,9 +38,11 @@ export const loadOpenAIChatModels = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
export const loadOpenAIEmbeddingsModel = async () => {
|
||||
export const loadOpenAIEmbeddingsModels = async () => {
|
||||
const openAIApiKey = getOpenaiApiKey();
|
||||
|
||||
if (!openAIApiKey) return {};
|
||||
|
||||
try {
|
||||
const embeddingModels = {
|
||||
'Text embedding 3 small': new OpenAIEmbeddings({
|
||||
|
Reference in New Issue
Block a user