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

增加api流式接口; 新增基于流式api和streamlit的web_demo #808

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liseri
Copy link

@liseri liseri commented Apr 25, 2023

  1. 增加api流式接口(ocetstream方式,非websocket);基于fastapi,没有引入其它的框架
    写完发现,已经有相关的PR,简单扫了一下,没有我这个方案简单。
  2. 新增(改自旧demo)一个基于流式api和streamlit的web_demo
  3. 将api和demo相关文件抽到到一个新目录
  4. 修改以上3点相关的readme部分

@is
Copy link
Contributor

is commented May 14, 2023

我也觉得用pydantic定义Model的方式,更简洁干净一些.

@Shawn4742
Copy link

感谢分享,请问:

  1. 用fastapi作为后端,streamlit前端,比单独用streamlit慢了很多,这是什么原因呢?
  2. 流式输出不是逐字输出,是一段一段,这是代码本身造成的吗?

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

Successfully merging this pull request may close these issues.

3 participants