prompt-engineering / click-prompt

ClickPrompt - Streamline your prompt design, with ClickPrompt, you can easily view, share, and run these prompts with just one click. ClickPrompt 用于一键轻松查看、分享和执行您的 Prompt。
https://www.clickprompt.org/
MIT License
2.28k stars 197 forks source link

feat: add stream chat api #112

Closed genffy closed 1 year ago

genffy commented 1 year ago

issue: https://github.com/prompt-engineering/click-prompt/issues/86

stream api worked not as except, need some help to figure what's wrong.

if config runtime as edge, stream worked, but node:crypto not worked

some refs: https://vercel.com/blog/gpt-3-app-next-js-vercel-edge-functions https://github.com/vercel/next.js/issues/9965#issuecomment-614823642 https://beta.nextjs.org/docs/routing/route-handlers#streaming https://beta.nextjs.org/docs/routing/route-handlers#edge-and-nodejs-runtimes https://nextjs.org/docs/api-routes/edge-api-routes

genffy commented 1 year ago

still WIP, not merge @CGQAQ

CGQAQ commented 1 year ago

👍 LGTM