diff --git a/src/app/api/completion/route.ts b/src/app/api/completion/route.ts index 6026a1b..496bd3f 100644 --- a/src/app/api/completion/route.ts +++ b/src/app/api/completion/route.ts @@ -3,7 +3,7 @@ import { OpenAIStream, StreamingTextResponse } from 'ai'; // Create an OpenAI API client (that's edge friendly!) const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, + apiKey: process.env.OPENAI_API_KEY || '', }); // Set the runtime to edge for best performance