fix: bug fix

This commit is contained in:
n4ze3m
2025-01-25 15:19:28 +05:30
parent 7b6b6751cc
commit 51804bc9ae
29 changed files with 133 additions and 136 deletions

View File

@@ -114,7 +114,7 @@ export const addOpenAICofig = async ({ name, baseUrl, apiKey, provider }: { name
export const getAllOpenAIConfig = async () => {
const openaiDb = new OpenAIModelDb()
const configs = await openaiDb.getAll()
return configs.filter(config => config.db_type === "openai")
return configs.filter(config => config?.db_type === "openai")
}
export const updateOpenAIConfig = async ({ id, name, baseUrl, apiKey }: { id: string, name: string, baseUrl: string, apiKey: string }) => {