diff --git a/app/api/chat-with-functions/route.ts b/app/api/chat-with-functions/route.ts index 9c54443..ccfc131 100644 --- a/app/api/chat-with-functions/route.ts +++ b/app/api/chat-with-functions/route.ts @@ -3,7 +3,7 @@ import OpenAI from "openai"; import { OpenAIStream, StreamingTextResponse } from "ai"; const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY || "" , + apiKey: process.env.OPENAI_API_KEY , }); export const runtime = "node"; diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 3d934bf..af866bf 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -3,7 +3,7 @@ import OpenAI from "openai"; import { OpenAIStream, StreamingTextResponse } from "ai"; const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.OPENAI_API_KEY ?? "", }); export const runtime = "edge";