Files
medreport_mrb2b/app/home/(user)/_lib/server/is-valid-open-ai-env.ts
Danel Kungla 17e7a98534 eslint fix
2025-10-07 18:43:42 +03:00

12 lines
203 B
TypeScript

import OpenAI from 'openai';
export const isValidOpenAiEnv = async () => {
try {
const client = new OpenAI();
await client.models.list();
return true;
} catch {
return false;
}
};