prompt-engineering/click-prompt

feature request: add stream based chatgpt api

CGQAQ opened this issue · 2 comments

CGQAQ commented

ref: openai/openai-node#18

ref: https://github.com/CGQAQ/chatgpt-sse-hide-example

Blocking

  • Figuring out how to do SSE in Next.js on Vercel deploy

code snippet

image

Edge Runtime does not support node:crypto , try to adapter it

nextjs support stream have two ways:

FYI: the project use API Routes without edge runtime, add this feature may cause some breaking changes on user authentication.