Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yichuxue opened this issue Apr 12, 2023 · 9 comments
Open

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

yichuxue opened this issue Apr 12, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@yichuxue
Copy link

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

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

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

@yichuxue yichuxue added the enhancement New feature or request label Apr 12, 2023
@little51
Copy link

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

@yichuxue
Copy link
Author

感谢,我试试

@82kg
Copy link

82kg commented May 30, 2023

有个替代方案,可以从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
Copy link
Author

yichuxue commented May 30, 2023 via email

@frey0415
Copy link

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

@yichuxue
Copy link
Author

yichuxue commented Jul 21, 2023 via email

@littleFutureGo
Copy link

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

@yichuxue
Copy link
Author

yichuxue commented Dec 18, 2023 via email

@qq572099423
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants
@little51 @qq572099423 @yichuxue @82kg @frey0415 @littleFutureGo and others