alibaba / ChatUI

The UI design language and React library for Conversational UI
https://chatui.io
MIT License
2.61k stars 277 forks source link

有提供stream模式吗,类似打字机的效果。 #109

Open yichuxue opened 1 year ago

yichuxue commented 1 year ago

What problem does this feature solve? 我需要对接大语言模型,输出不是一次性的。

Describe the solution you'd like 暂无,能否支持这个功能。

What does the proposed API look like? 提供一个支持stream模式的api

little51 commented 1 year ago

有个替代方案,可以从dom中按“Bubble text”类查到当前正在输出文字的元素,设置innerHTML属性,代码见:https://github.com/git-cloner/codegen/blob/main/chat/src/App.js,效果如https://gitclone.com/aiit/chat/

yichuxue commented 1 year ago

感谢,我试试

82kg commented 1 year ago

有个替代方案,可以从dom中按“Bubble text”类查到当前正在输出文字的元素,设置innerHTML属性,代码见:https://github.com/git-cloner/codegen/blob/main/chat/src/App.js,效果如https://gitclone.com/aiit/chat/

有没有兴趣部署个Vicuna-13B、ChatGLM-6B 不太行了。参见 https://lmsys.org/blog/2023-05-25-leaderboard/

yichuxue commented 1 year ago

www.yichuxue.com

frey0415 commented 1 year ago

这有个不太成熟的解决方案:写个含有updateMsg的回调,让处理EventStream的方法不断去执行这个回调

yichuxue commented 1 year ago

www.yichuxue.com

littleFutureGo commented 8 months ago

这里有解决方案了嘛~求求

yichuxue commented 8 months ago

www.yichuxue.com

qq572099423 commented 3 months ago

已实现方案:requests.send方法访问服务器时,服务器接口返回如下格式: image 然后在handlers.parseResponse方法中加入如下逻辑即可实现: image