-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
需求背景
业务上需要支持提前中断AI流式输出
问题
- appbuilder中没有提供类似中断的接口;
- 使用close关闭资源时出现阻塞,影响了后续业务。
com.baidubce.appbuilder.base.utils.iterator.StreamIterator#close
public void close() {
try {
if (reader != null) {
reader.close(); //这里阻塞,直到百度服务器输出结束关闭连接
}
} catch (Exception ignored) {
// ignore
} finally {
try {
if (resp != null) {
resp.close();
}
} catch (Exception ignored) {
// ignore
}
}
}Metadata
Metadata
Assignees
Labels
No labels