mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-05-07 19:03:16 +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 { SubscriptionStatus } from '../payment/plans';
|
||||||
import { ensureArgsSchemaOrThrowHttpError } from '../server/validation';
|
import { ensureArgsSchemaOrThrowHttpError } from '../server/validation';
|
||||||
|
|
||||||
const openAi = getOpenAi();
|
const openAi = setUpOpenAi();
|
||||||
function getOpenAi(): OpenAI {
|
function setUpOpenAi(): OpenAI {
|
||||||
if (process.env.OPENAI_API_KEY) {
|
if (process.env.OPENAI_API_KEY) {
|
||||||
return new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
return new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user