feat: implement order notifications service with TTO reservation confirmation handling feat: create migration for TTO booking email webhook trigger
13 lines
242 B
TypeScript
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;
|
|
}
|
|
};
|