You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the problem(描述问题)
如题
做大模型会话,流式响应,我是前端,nodejs一知半解……
我尝试用了
const sse = require('koa-sse-stream');
@configuration({imports: [ sse ]}) // 这样注册无效
这样注册可以流式响应,但其他的接口都受影响 无法返回了。
this.app.use(sse({ maxClients: 5000, pingInterval: 30000 }));
我想应该把sse搞一个服务,比如在不同的端口或者线程去响应。只在某个路由调用。
但又不懂怎么写……
希望各位大神帮帮忙!
Midway Versions(Midway 版本)
"@midwayjs/core": "^3.12.0"
Beta Was this translation helpful? Give feedback.
All reactions