ant-design / pro-chat

🤖 Components Library for Quickly Building LLM Chat Interfaces.
https://pro-chat.antdigital.dev
MIT License
649 stars 78 forks source link

👑 [需求] 流式支持,不是流式返回后收集所有响应再效果上实现打字 #182

Closed beeant0512 closed 2 months ago

beeant0512 commented 4 months ago

🥰 需求描述

看了现有的都是在接收完流式响应的内容后,前端伪装出的打字效果,或许是我的使用方式不对

想要的就是收到一个流式响应后实时的追加消息上去,或者提供更新消息的API

🧐 解决方案

🚑 其他信息

ONLY-yours commented 4 months ago

@beeant0512 直接返回一个 流式的 readable response 就好了,参考 https://pro-chat.antdigital.dev/guide/sse 最下方还有 demo