|
|
@@ -90,6 +90,7 @@
|
|
|
currentRetry: 0, // 当前重试次数
|
|
|
isRequesting: false, // 请求状态锁
|
|
|
question:'',
|
|
|
+ conversation_id:'',
|
|
|
streamingResponse:'',
|
|
|
receivedData:'',
|
|
|
dialogList:[],
|
|
|
@@ -160,6 +161,7 @@
|
|
|
data:{
|
|
|
query: this.question,
|
|
|
identity:'被教练者',
|
|
|
+ conversation_id: this.conversation_id
|
|
|
},
|
|
|
header: {
|
|
|
'Content-Type': 'application/json',
|
|
|
@@ -195,6 +197,7 @@
|
|
|
if(!n.trim()) return
|
|
|
let nj = JSON.parse(n);
|
|
|
if(nj.event=='message'){
|
|
|
+ this.conversation_id = nj.conversation_id;
|
|
|
let answer = this.dialogList[this.dialogList.length-1].answer+nj.answer?.replace(/(\r\n|\n|\r)+/g, '<br>');
|
|
|
this.$set(this.dialogList[this.dialogList.length-1],'answer',answer);
|
|
|
this.$set(this.dialogList[this.dialogList.length-1],'id',nj.id);
|