|
@@ -8109,6 +8109,9 @@ export default {
|
|
|
this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
nextSteps(clickType, ttype) {
|
|
|
+ if(!this.time()){
|
|
|
+ return
|
|
|
+ }
|
|
|
// if (this.cidType == 1) {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.courseName != "") {
|
|
@@ -8502,7 +8505,7 @@ export default {
|
|
|
return true;
|
|
|
} else {
|
|
|
let time = new Date().getTime();
|
|
|
- if (time - this.now > 3000) {
|
|
|
+ if (time - this.now > 1000) {
|
|
|
this.now = time;
|
|
|
return true;
|
|
|
} else {
|
|
@@ -16927,9 +16930,18 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
await _this.aiGetgetAiContent(_uuid)
|
|
|
},
|
|
|
aiGetgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.textLoading = false
|
|
|
+ this.ttextLoading = false
|
|
|
+ this.isTextCancelToken = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -19515,9 +19527,19 @@ ${msg}
|
|
|
await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetailgetAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.isOutlineTaskCancelToken[_tindex2] = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -19845,9 +19867,19 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
|
|
|
await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
+ this.isOutlineTaskCancelToken[_tindex2] = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20015,9 +20047,19 @@ ${_this.aiCallBack.taskDetail}
|
|
|
await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail2getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20176,9 +20218,19 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
|
|
|
},
|
|
|
aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20533,9 +20585,19 @@ ${_text2}`
|
|
|
await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail5getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -20579,11 +20641,11 @@ ${_text2}`
|
|
|
let _this = this
|
|
|
_source.onerror = function(event) {
|
|
|
// 处理错误,可以尝试重新连接
|
|
|
- console.log('EventSource error:', event);
|
|
|
- _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
- _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
- _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
- _source.close();
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ _this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ _this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ _source.close();
|
|
|
};
|
|
|
},
|
|
|
async aiDetail52(msg, index) {
|
|
@@ -20714,9 +20776,19 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
|
|
|
},
|
|
|
aiDetail52getAiContent(_uid, loading, _tindex2) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
this.allTextArray[_tindex2] = ""
|
|
@@ -20931,9 +21003,19 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
await _this.aiCpotegetAiContent(_uuid, _index, callback)
|
|
|
},
|
|
|
aiCpotegetAiContent(_uid, loading, callback) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ let _source;
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error){
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.cpoteLoading[loading] = false
|
|
|
+ this.cpotetLoading[loading] = false
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21114,9 +21196,19 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aiteacherTextDetailgetAiContent(_uuid)
|
|
|
},
|
|
|
aiteacherTextDetailgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', event);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.teacherTextLoading = false
|
|
|
+ this.tteacherTextLoading = false
|
|
|
+ this.isTeacherTextCancelToken = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21305,9 +21397,19 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aitargetTextDetailgetAiContent(_uuid)
|
|
|
},
|
|
|
aitargetTextDetailgetAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch (error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.targetTextLoading = false
|
|
|
+ this.ttargetTextLoading = false
|
|
|
+ this.isTargetCancelToken1 = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -21663,9 +21765,19 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
await _this.aitargetTextDetail2getAiContent(_uuid)
|
|
|
},
|
|
|
aitargetTextDetail2getAiContent(_uid) {
|
|
|
- // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
- // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ try {
|
|
|
+ // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
+ } catch(error) {
|
|
|
+ console.log('EventSource error:', error);
|
|
|
+ this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
|
|
|
+ this.targetTextLoading2 = false
|
|
|
+ this.ttargetTextLoading2 = false
|
|
|
+ this.isTargetCancelToken2 = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -22138,7 +22250,8 @@ ${msg}
|
|
|
let dArray = []
|
|
|
try {
|
|
|
let regex2 = new RegExp("/([{,])(\w+):/g")
|
|
|
- dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":'))
|
|
|
+ //
|
|
|
+ dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(/(?<!")content(?!")/g, '"content"'))
|
|
|
} catch (error) {
|
|
|
// callback ? callback() : ''
|
|
|
console.log("error_________________" + error);
|
|
@@ -22150,7 +22263,9 @@ ${msg}
|
|
|
// callback ? callback() : ''
|
|
|
_this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
|
|
|
console.log("error_________________" + error);
|
|
|
+ _this.isFileCancelToken = null;
|
|
|
_this.aiSearchFile(messages, callback)
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
for(let i = 0; i < dArray.length; i++){
|