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

feat: add stream chat api

Open genffy opened this issue 2 years ago • 1 comments

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

  • add stream like api
  • use stream api at ChatRoom
  • add SimpleMarkdown to ChatRoom

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 avatar Mar 12 '23 15:03 genffy

still WIP, not merge @CGQAQ

genffy avatar Mar 14 '23 07:03 genffy

👍 LGTM

CGQAQ avatar Mar 17 '23 01:03 CGQAQ