mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-05-06 18:30:23 +02:00
Change name of open AI setup function
This commit is contained in:
parent
e3588fae5e
commit
5c39bcd874
@ -14,8 +14,8 @@ import OpenAI from 'openai';
|
||||
import { SubscriptionStatus } from '../payment/plans';
|
||||
import { ensureArgsSchemaOrThrowHttpError } from '../server/validation';
|
||||
|
||||
const openAi = getOpenAi();
|
||||
function getOpenAi(): OpenAI {
|
||||
const openAi = setUpOpenAi();
|
||||
function setUpOpenAi(): OpenAI {
|
||||
if (process.env.OPENAI_API_KEY) {
|
||||
return new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user