|
@@ -15128,7 +15128,8 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
_source.onmessage = _e => {
|
|
|
- if (_e.data.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
+ let _eData = JSON.parse(_e.data).content;
|
|
|
+ if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
//对话已经完成
|
|
|
_mdText = _mdText.replace("_", "");
|
|
|
_source.close();
|
|
@@ -15140,7 +15141,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
} else {
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
- _text = _e.data.replaceAll("'", "");
|
|
|
+ _text = _eData.replaceAll("'", "");
|
|
|
if (_allText == "") {
|
|
|
_allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
|
|
|
} else {
|