click-prompt icon indicating copy to clipboard operation
click-prompt copied to clipboard

feature request: add stream based chatgpt api

Open CGQAQ opened this issue 2 years ago • 2 comments

ref: https://github.com/openai/openai-node/issues/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

CGQAQ avatar Mar 09 '23 09:03 CGQAQ

demo: https://github.com/genffy/nextjs-chatgpt-demo

genffy avatar Mar 10 '23 06:03 genffy

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.

genffy avatar Mar 12 '23 09:03 genffy