Skip to content

Commit

Permalink
🚸 (openai) Add missing credentials error to chat completion streamer
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jun 5, 2023
1 parent 61fd44f commit 8822e4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/viewer/src/pages/api/integrations/openai/streamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const handler = async (req: Request) => {
messages
)

if (!stream) return new Response('Missing credentials', { status: 400 })

return new Response(stream, {
status: 200,
headers: {
Expand Down

0 comments on commit 8822e4e

Please sign in to comment.