Files
medreport_mrb2b/app/home/(user)/_lib/server/is-valid-open-ai-env.ts
Danel Kungla 72f6f2b716 feat: create email template for TTO reservation confirmation
feat: implement order notifications service with TTO reservation confirmation handling

feat: create migration for TTO booking email webhook trigger
2025-09-30 16:05:43 +03:00

13 lines
242 B
TypeScript

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