codegen icon indicating copy to clipboard operation
codegen copied to clipboard

【问题请教】关于 ChatUI 卡片组件能否支持 SSE?

Open LukeLiou opened this issue 1 year ago • 4 comments

如题,我看到博主已经实现文本消息的 SSE,还想请问ChatUI 卡片组件(其他非文本)能否支持 SSE?或者有啥其他思路吗,因为请求大模型需要一定的时间,才能拿到所有结果

LukeLiou avatar Sep 14 '24 09:09 LukeLiou

我这个代码略陈旧些了,并未实现SSE,而是用轮询方法不断post模拟实现的。SSE用openai.beta.chat.completions.stream实现,可参考:https://github.com/git-cloner/querychain/blob/main/chat-app/src/App.js中的chat_stream方法,不过也只是文本

little51 avatar Sep 18 '24 05:09 little51

我这个代码略陈旧些了,并未实现SSE,而是用轮询方法不断post模拟实现的。SSE用openai.beta.chat.completions.stream实现,可参考:https://github.com/git-cloner/querychain/blob/main/chat-app/src/App.js中的chat_stream方法,不过也只是文本

仔细拜读了下, 确实是通过轮询post,我再去看看 SSE 的调用解析,感谢你的思路~ 另外还请问:https://gitclone.com/aiit/codegen_stream/v2这个接口是怎么部署的,我想把用 node 搭建的 sse 接口部署到远程

LukeLiou avatar Sep 20 '24 02:09 LukeLiou

这个项目的接口是python实现的。部署方法是https://github.com/git-cloner/codegen?tab=readme-ov-file#install,我未使用node.js实现过SSE

little51 avatar Sep 23 '24 00:09 little51

这个项目的接口是python实现的。部署方法是https://github.com/git-cloner/codegen?tab=readme-ov-file#install,我未使用

好的,谢谢🙏

LukeLiou avatar Sep 23 '24 07:09 LukeLiou