Fix issue with timezones
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { env } from "~/env.mjs";
|
||||
|
||||
import { default as OriginalOpenAI } from "openai";
|
||||
import { OpenAI } from "openpipe";
|
||||
// import { OpenAI } from "openpipe";
|
||||
|
||||
const openAIConfig = { apiKey: env.OPENAI_API_KEY ?? "dummy-key" };
|
||||
|
||||
// Set a dummy key so it doesn't fail at build time
|
||||
export const openai = env.OPENPIPE_API_KEY
|
||||
? new OpenAI.OpenAI(openAIConfig)
|
||||
: new OriginalOpenAI(openAIConfig);
|
||||
// export const openai = env.OPENPIPE_API_KEY
|
||||
// ? new OpenAI.OpenAI(openAIConfig)
|
||||
// : new OriginalOpenAI(openAIConfig);
|
||||
|
||||
export const openai = new OriginalOpenAI(openAIConfig);
|
||||
|
||||
Reference in New Issue
Block a user