修改了一些错误 (#254)

* Update sse.ts

解决chatglm2控制台输出一半不输出的问题

* 解决知识库相似度搜索结果超过1

* Update sse.ts

---------

Co-authored-by: Archer <545436317@qq.com>
This commit is contained in:
qing hua
2023-09-05 18:28:59 +08:00
committed by GitHub
parent ea65d9b34b
commit 95389e31f7
2 changed files with 70 additions and 53 deletions

View File

@@ -44,7 +44,7 @@ export class SSEParseData {
data: parseData
};
} catch (error) {
if (typeof item.data === 'string') {
if (typeof item.data === 'string' && !item.data.startsWith(": ping")) {
this.storeReadData += item.data;
} else {
this.storeReadData = '';