Replies: 2 comments 3 replies
-
@AllentDan any clue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
解决方法就是用 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我这边自己搭的fastapi,流式调用stream_infer接口的时候会遇到问题。因为stream_infer内部是把主线程的event_loop送进子线程再调用generate函数,但是在这之前fastapi已经开始run event_loop了,所以会报一个This event loop is already running的错误
这个时候即使用nest_asyncio的方法,但是两个线程公用一个event_loop也还是会报错。
有什么比较好的解决办法吗?
Beta Was this translation helpful? Give feedback.
All reactions