click-prompt
click-prompt copied to clipboard
feature request: add stream based chatgpt api
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

demo: https://github.com/genffy/nextjs-chatgpt-demo
Edge Runtime does not support node:crypto , try to adapter it
nextjs support stream have two ways:
- API Routes with edge runtime, but have some limit unsupported-apis
- router handler streaming
FYI: the project use API Routes without edge runtime, add this feature may cause some breaking changes on user authentication.