|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
- <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
|
|
|
+ <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
|
|
|
<div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
|
|
|
<div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
|
|
|
- <div class="pb_content_body" style="position: relative; margin: 0">
|
|
|
+ <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
|
|
|
<div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
|
|
|
<div class="courseTop">
|
|
|
<div class="stepsNav">
|
|
@@ -198,7 +198,7 @@
|
|
|
<span>生成模式:</span>
|
|
|
<el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
|
|
|
<div class="all_choose info_radio">
|
|
|
- <el-radio :label="1">引导模式生成</el-radio>
|
|
|
+ <el-radio :label="1">对话模式生成</el-radio>
|
|
|
</div>
|
|
|
<div class="all_choose info_radio" style="margin-left: 10px">
|
|
|
<el-radio :label="true">从已有教案生成</el-radio>
|
|
@@ -5141,7 +5141,7 @@
|
|
|
">
|
|
|
<div class="lineTitle clineTitle">评价设置</div>
|
|
|
<div style="margin-left:auto;display: flex;">
|
|
|
- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
|
|
|
<div class="r_pub_button_op"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
|
|
|
@click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
|
|
@@ -8440,6 +8440,22 @@ export default {
|
|
|
}
|
|
|
this.$refs.stepBox.scrollTop = 0;
|
|
|
},
|
|
|
+ setTipsIndex(){
|
|
|
+ // 使用 setTimeout 确保对话框已经渲染完成
|
|
|
+ this.$nextTick(() => {
|
|
|
+ const dialog = document.querySelector('.custom-confirm-box');
|
|
|
+ if (dialog) {
|
|
|
+ const parent = dialog.parentElement;
|
|
|
+ if (parent) {
|
|
|
+ parent.style.zIndex = 9999999;
|
|
|
+ const adjacentElement = parent.nextElementSibling;
|
|
|
+ if (adjacentElement) {
|
|
|
+ adjacentElement.style.zIndex = 9999998;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
nextSteps(clickType, ttype) {
|
|
|
if(!this.time()){
|
|
|
return
|
|
@@ -8591,7 +8607,8 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
+ customClass: 'custom-confirm-box'
|
|
|
})
|
|
|
.then(() => {
|
|
|
if(this.isTeacherTaskCancelToken2){
|
|
@@ -8621,6 +8638,9 @@ export default {
|
|
|
}).catch((v) => {
|
|
|
console.log(v);
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setTipsIndex()
|
|
|
+ }, 500)
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -11233,11 +11253,45 @@ export default {
|
|
|
let _file = this.knowFileArray[fi]
|
|
|
let fileM = _file.grade ? converter(_file.grade).split('/') : 1
|
|
|
let fileS = _file.name ? converter(_file.name).split('/') : 1
|
|
|
- let _sub = fileS == 1 ? [1] : this.arrayToArray(fileS, sub)
|
|
|
- let _mclass = fileM == 1 ? [1] : this.arrayToArray(fileM, mclass)
|
|
|
+ let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
|
|
|
+ let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
|
|
|
let fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
|
|
|
- if(_sub.length > 0 && _mclass.length > 0 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+ if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+ if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1){
|
|
|
+ this.knowInfoData.push({
|
|
|
+ name: _file.filename,
|
|
|
+ url: _file.url,
|
|
|
+ uid: '',
|
|
|
+ type: 3,
|
|
|
+ fileid: _file.fileid,
|
|
|
+ });
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
+ }
|
|
|
+ fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
+
|
|
|
+ if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1){
|
|
|
this.knowInfoData.push({
|
|
|
name: _file.filename,
|
|
|
url: _file.url,
|
|
@@ -11862,6 +11916,8 @@ export default {
|
|
|
targetCourseText2: this.targetCourseText2,
|
|
|
chatid: this.chatid,
|
|
|
languageSetting: this.languageSetting,
|
|
|
+ knowInfoData: this.knowInfoData,
|
|
|
+ knowFileids: this.knowFileids,
|
|
|
}),
|
|
|
iresearch: this.isFileSearch ? 1 : 2,
|
|
|
},
|
|
@@ -12135,6 +12191,8 @@ export default {
|
|
|
targetCourseText2: this.targetCourseText2,
|
|
|
chatid: this.chatid,
|
|
|
languageSetting: this.languageSetting,
|
|
|
+ knowInfoData: this.knowInfoData,
|
|
|
+ knowFileids: this.knowFileids,
|
|
|
}),
|
|
|
iresearch: this.isFileSearch ? 1 : 2,
|
|
|
},
|
|
@@ -14265,6 +14323,8 @@ export default {
|
|
|
this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
|
|
|
this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
|
|
|
this.languageSetting = (JSON.parse(res.data[0][0].setting).languageSetting || JSON.parse(res.data[0][0].setting).languageSetting == 0) ? JSON.parse(res.data[0][0].setting).languageSetting : 0;
|
|
|
+ this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
|
|
|
+ this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
|
|
|
if(this.targetCourseText2 || (!this.teacherCourseText)){
|
|
|
this.courseTextBool = true
|
|
|
}
|
|
@@ -14415,6 +14475,8 @@ export default {
|
|
|
this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
|
|
|
this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
|
|
|
this.languageSetting = (JSON.parse(res.data[0][0].setting).languageSetting || JSON.parse(res.data[0][0].setting).languageSetting == 0) ? JSON.parse(res.data[0][0].setting).languageSetting : 0;
|
|
|
+ this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
|
|
|
+ this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
|
|
|
if(this.targetCourseText2 || (!this.teacherCourseText)){
|
|
|
this.courseTextBool = true
|
|
|
}
|
|
@@ -16534,12 +16596,23 @@ export default {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
|
}
|
|
|
- this.openAiDialog(2, 'aiDetail',1)
|
|
|
+ let functionA = ''
|
|
|
if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
|
|
|
- setTimeout(() => {
|
|
|
+ // setTimeout(() => {
|
|
|
// this.openAiDialog(2, 'aitargetTextDetail2',1)
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
+ // }, 500);
|
|
|
+ functionA = ()=>{
|
|
|
this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
- }, 500);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.openAiDialog(2, 'aiDetail',1, functionA)
|
|
|
+ if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail2',1)
|
|
|
+ // this.openAiDialog(2, 'aitargetTextDetail3',1)
|
|
|
+ // }, 500);
|
|
|
}
|
|
|
|
|
|
this.courseTextBool = true
|
|
@@ -16660,7 +16733,7 @@ export default {
|
|
|
this.aitype = "aiDetail"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
|
|
|
this.aiText = this.aiJson.aiDetail
|
|
|
- this.aiCallBack = callback
|
|
|
+ this.aiCallBack = [callback, index]
|
|
|
} else if (type == "aiOutline") {
|
|
|
this.aitype = "aiOutline"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
|
|
@@ -16834,6 +16907,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
type: "warning",
|
|
|
+ customClass: 'custom-confirm-box'
|
|
|
})
|
|
|
.then(() => {
|
|
|
|
|
@@ -16856,6 +16930,9 @@ export default {
|
|
|
}).catch((v) => {
|
|
|
console.log(v);
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setTipsIndex()
|
|
|
+ }, 500)
|
|
|
return;
|
|
|
}else {
|
|
|
this.aitype = "teacherDetail2"
|
|
@@ -16953,6 +17030,10 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ if(!this.courseText){
|
|
|
+ this.$message.error("请生成简要描述后再生成目标");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.aitype = type
|
|
|
this.aiText = this.aiJson.aiTargetGet
|
|
|
this.aiText2 = this.aiJson.aiTarget2
|
|
@@ -17670,16 +17751,14 @@ ${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
|
|
|
${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
|
|
|
-${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
|
|
|
+${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
|
|
|
|
|
|
## 要求
|
|
|
${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
|
|
|
|
|
|
${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
|
|
|
|
|
|
-${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
|
|
|
-
|
|
|
-如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
|
|
|
+${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
|
|
|
this.aiGet(msg)
|
|
|
},
|
|
|
setUnitJson() {
|
|
@@ -17835,6 +17914,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
this.ttextLoading = false
|
|
|
this.courseTextB = false
|
|
|
this.isTextCancelToken = null
|
|
|
+ this.aiCallBack[1] ? this.aiCallBack[1]() : ''
|
|
|
return;
|
|
|
} else {
|
|
|
_iindex++
|
|
@@ -19713,7 +19793,7 @@ ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
|
|
|
|
|
|
# Format example
|
|
|
-{answerQ:"问题"}
|
|
|
+{"answerQ":"问题"}
|
|
|
`
|
|
|
}else if(type == 45){
|
|
|
messages = `NOTICE
|
|
@@ -19785,8 +19865,16 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
|
let match = data.message.match(regex);
|
|
|
// eval("var aaa = " + match[0])
|
|
|
tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
|
|
|
-
|
|
|
} catch (error) {
|
|
|
+ try {
|
|
|
+ let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
|
|
|
+ let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
|
|
|
+ let match = data.message.match(regex.replace(regex2, '"$1"'));
|
|
|
+ // eval("var aaa = " + match[0])
|
|
|
+ tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
|
|
|
+ } catch (error) {
|
|
|
+ console.log("error_________________" + error);
|
|
|
+ }
|
|
|
console.log("error_________________" + error);
|
|
|
}
|
|
|
console.log("error_________________" + error);
|
|
@@ -19884,7 +19972,7 @@ ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
|
|
|
|
|
|
# Format example
|
|
|
-{answerQ:"问题"}
|
|
|
+{"answerQ":"问题"}
|
|
|
`
|
|
|
}else if(type == 45){
|
|
|
messages = `NOTICE
|
|
@@ -19953,7 +20041,8 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
} catch (error) {
|
|
|
try {
|
|
|
let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
|
|
|
- let match = data.message.match(regex);
|
|
|
+ let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
|
|
|
+ let match = data.message.match(regex.replace(regex2, '"$1"'));
|
|
|
// eval("var aaa = " + match[0])
|
|
|
tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
|
|
|
|
|
@@ -21739,7 +21828,8 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
+ customClass: 'custom-confirm-box'
|
|
|
})
|
|
|
.then(() => {
|
|
|
_this.aiDetail52(msg, index, callback)
|
|
@@ -21747,6 +21837,9 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
console.log(v);
|
|
|
callback ? callback() : ''
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.setTipsIndex()
|
|
|
+ }, 500)
|
|
|
}
|
|
|
console.log(error);
|
|
|
});
|
|
@@ -21771,7 +21864,8 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
+ customClass: 'custom-confirm-box'
|
|
|
})
|
|
|
.then(() => {
|
|
|
_this.aiDetail52(msg, _tindex2, callback)
|
|
@@ -21779,6 +21873,9 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
console.log(v);
|
|
|
callback ? callback() : ''
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.setTipsIndex()
|
|
|
+ }, 500)
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -21848,7 +21945,8 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
distinguishCancelAndClose: true,
|
|
|
- type: "warning"
|
|
|
+ type: "warning",
|
|
|
+ customClass: 'custom-confirm-box'
|
|
|
})
|
|
|
.then(() => {
|
|
|
_this.aiDetail52(msg, _tindex2, callback)
|
|
@@ -21856,6 +21954,9 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
console.log(v);
|
|
|
callback ? callback() : ''
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.setTipsIndex()
|
|
|
+ }, 500)
|
|
|
};
|
|
|
},
|
|
|
aiDetail52getAiContentText(_e, loading, _tindex2, _source){
|
|
@@ -22743,8 +22844,8 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
}
|
|
|
|
|
|
if(!msg2 && sub.length){
|
|
|
- let _fileid = _this.importFileid(sub)
|
|
|
- fileid = [...fileid, ..._fileid]
|
|
|
+ // let _fileid = _this.importFileid(sub)
|
|
|
+ // fileid = [...fileid, ..._fileid]
|
|
|
}
|
|
|
|
|
|
let messages = `NOTICE
|
|
@@ -22785,7 +22886,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
_this.isTargetCancelToken2 = _this.ajax.setCancelSource();
|
|
|
|
|
|
let params = {
|
|
|
- assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
+ assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
|
|
|
message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
@@ -22845,7 +22946,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
this.isTargetCancelToken2 = null
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
let _iindex = 0
|
|
@@ -22856,7 +22957,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
_mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
|
|
|
this.isTargetCancelSource2.close();
|
|
|
this.isTargetCancelSource2 = null;
|
|
|
- this.targetCourseText2 = _mdText;
|
|
|
+ this.targetCourseText2 = text1+' \n '+_mdText;
|
|
|
this.targetTextLoading2 = false
|
|
|
this.ttargetTextLoading2 = false
|
|
|
this.targetCourseText2B = false
|
|
@@ -22878,7 +22979,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
if(_iindex == 10){
|
|
|
- this.targetCourseText2 = _mdText;
|
|
|
+ this.targetCourseText2 = text1+' \n '+_mdText;
|
|
|
_iindex = 0
|
|
|
}
|
|
|
if(this.targetTextLoading2){
|
|
@@ -22975,6 +23076,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
|
|
|
## 课程信息
|
|
|
课程名字:${this.courseName}
|
|
|
+课程概况:${this.courseText}
|
|
|
${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
${mclass.length ? '年级:' + mclass.join(",") : ''}`
|
|
|
let _uuid = uuidv4();
|
|
@@ -23034,6 +23136,7 @@ ${mclass.length ? '年级:' + mclass.join(",") : ''}`
|
|
|
// }
|
|
|
if (data.message) {
|
|
|
console.log('返回回来的目标:',data.message);
|
|
|
+ _this.targetCourseText2 = data.message
|
|
|
_this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
|
|
|
|
|
|
}
|
|
@@ -23341,10 +23444,10 @@ ${msg}
|
|
|
console.log(data.message);
|
|
|
let dArray = []
|
|
|
try {
|
|
|
- let regex2 = new RegExp("/([{,])(\w+):/g")
|
|
|
- let regex3 = new RegExp('/(?<!")content(?!")/g')
|
|
|
+ // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
|
|
|
+ let regex3 = new RegExp('(?<!")content(?!")','g')
|
|
|
//
|
|
|
- dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(regex3, '"content"'))
|
|
|
+ dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
|
|
|
} catch (error) {
|
|
|
// callback ? callback() : ''
|
|
|
console.log("error_________________" + error);
|