|
@@ -683,7 +683,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
概念群
|
|
@@ -709,7 +709,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
问题链
|
|
@@ -735,7 +735,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
目标层
|
|
@@ -761,7 +761,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
任务簇
|
|
@@ -1603,7 +1603,16 @@
|
|
|
}" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
|
|
|
v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
|
|
|
<div style="background: #fff; border-radius: 5px">
|
|
|
- <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
|
|
|
+ <div class="taskTitle">
|
|
|
+ <div style="display: flex;width: 100%;justify-content: space-between;">
|
|
|
+ <span>任务{{ itemTaskIndex + 1 }}</span>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && courseState == 5">
|
|
|
+ <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
|
|
|
+ @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- padding: 20px; -->
|
|
|
<div v-if="unitJson[unitIndex].easy != 1">
|
|
|
<div :style="{
|
|
@@ -5698,7 +5707,7 @@
|
|
|
<aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
|
|
|
</aiDialog>
|
|
|
<tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
|
|
|
- @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
|
|
|
+ @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
|
|
|
<aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
|
|
|
<aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
|
|
|
</div>
|
|
@@ -5729,6 +5738,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
import MarkdownIt from "markdown-it";
|
|
|
import aiCreateDialog from './aiCreateDialog.vue'
|
|
|
import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
|
|
|
+
|
|
|
var OpenCC = require("opencc-js");
|
|
|
let converter = OpenCC.Converter({
|
|
|
from:'hk',
|
|
@@ -5754,7 +5764,7 @@ export default {
|
|
|
aiTips,
|
|
|
tipsDialog,
|
|
|
aiCreateDialog,
|
|
|
- aiCreateVideoDialog
|
|
|
+ aiCreateVideoDialog,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -6004,7 +6014,7 @@ export default {
|
|
|
newIndex: "",
|
|
|
englishList: {},
|
|
|
typeIndex: "",
|
|
|
- courseState: 4,
|
|
|
+ courseState: 5,
|
|
|
taskJSONa: [
|
|
|
{
|
|
|
task: "",
|
|
@@ -6072,7 +6082,7 @@ export default {
|
|
|
"aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
|
|
|
"aiTask": "请根据<教学任务教案>。",
|
|
|
"aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
|
|
|
- "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述和任务名:<任务名>:<任务描述>",
|
|
|
+ "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
|
|
|
"aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
|
|
|
"aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
|
|
|
"aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
|
|
@@ -6115,6 +6125,7 @@ export default {
|
|
|
templatePan: ['0e7966d6-1e49-11ef-bee5-005056b86db5','60d153e3-1e49-11ef-bee5-005056b86db5','7f3e28b7-1e66-11ef-bee5-005056b86db5','9dd4bb76-1e48-11ef-bee5-005056b86db5','ab317f23-1e66-11ef-bee5-005056b86db5'],
|
|
|
courseJie:1,
|
|
|
courseTime:45,
|
|
|
+ allTextArray: [],
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -6808,7 +6819,7 @@ export default {
|
|
|
// if (this.cidType == 1) {
|
|
|
if (this.steps == 1) {
|
|
|
if (this.courseName != "") {
|
|
|
- if (this.ttaskDetailLoading5.indexOf('task-') !== -1 || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
|
|
|
+ if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
|
|
|
this.$message({
|
|
|
message: "请回答完毕后再次发送",
|
|
|
type: "warning"
|
|
@@ -6837,6 +6848,12 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ // if (!this.isOutline2) {
|
|
|
+ // this.openAiDialog(clickType, 'aiTeacher')
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
this.openAiDialog(clickType, 'aiTeacher')
|
|
|
return;
|
|
@@ -7383,10 +7400,19 @@ export default {
|
|
|
await this.generate(name, _html, i)
|
|
|
}
|
|
|
}else if(this.courseState == 5){
|
|
|
- let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
|
|
|
- let name = _task.task+'-教案'
|
|
|
- let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
|
|
|
- await this.generate(name, _html, index)
|
|
|
+ if(index == 0 || index){
|
|
|
+ let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
|
|
|
+ let name = _task.task+'-教案'
|
|
|
+ let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
|
|
|
+ await this.generate(name, _html, index)
|
|
|
+ }else {
|
|
|
+ for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
|
|
|
+ let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
|
|
|
+ let name = _task.task+'-教案'
|
|
|
+ let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
|
|
|
+ await this.generate(name, _html, i)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -9106,7 +9132,11 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
}
|
|
|
},
|
|
|
- addWork() {
|
|
|
+ addWork(type) {
|
|
|
+ if(type == 2 && this.courseName == "") {
|
|
|
+ this.$message.error("请补充填写课程名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
let cPan = 1;
|
|
|
for (var i = 0; i < this.unitJson.length; i++) {
|
|
|
for (
|
|
@@ -9200,9 +9230,12 @@ export default {
|
|
|
this.cid = res.data.courseId;
|
|
|
this.courseUserid = this.userid;
|
|
|
this.islogin = true;
|
|
|
- this.updateCourseState(4);
|
|
|
- // this.updateCourseState(5);
|
|
|
+ // this.updateCourseState(4);
|
|
|
+ this.updateCourseState(5);
|
|
|
this.addtips()
|
|
|
+ if(type == 2){
|
|
|
+ this.retrunCourse()
|
|
|
+ }
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.$message.error("网络不佳");
|
|
@@ -13485,9 +13518,9 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
openAiDialog(clickType, type, callback, index, tindex) {
|
|
|
- if(clickType == 1){
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if(clickType == 1){
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
if (this.courseName == "") {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
@@ -13750,11 +13783,12 @@ ${msg} 为**每个教学任务分别输出**以下内容。
|
|
|
${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
|
|
|
|
|
|
## 格式要求
|
|
|
-任务数量:${this.teacherText.length}个
|
|
|
+任务数量:${this.unitJson[0].chapterInfo[0].taskJson}个
|
|
|
任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动
|
|
|
评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
|
|
|
-工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
|
|
|
+工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
|
|
|
工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
|
|
|
+出现选择题和问答题的概率提高
|
|
|
|
|
|
## 参考资料
|
|
|
教学任务教案:${_text}
|
|
@@ -13806,7 +13840,7 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+t
|
|
|
|
|
|
|
|
|
## Format example
|
|
|
-[{"task": "任务名称1","detail": "教案输出为文本格式就行"},{"task": "任务名称2","detail": "教案输出为文本格式就行"}]`
|
|
|
+[{"task": "任务名称1","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称2","detail": "教案输出为文本或markdown格式就行"}]`
|
|
|
this.aiGet4(message, () => {
|
|
|
this.loading = false
|
|
|
this.isOutline2 = true
|
|
@@ -13858,11 +13892,13 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+t
|
|
|
// 补充资料:${url.join(",")}
|
|
|
// 补充描述:${this.courseText2} ##补充参考资料和
|
|
|
|
|
|
- let msg = `
|
|
|
+ let msg = `NOTICE
|
|
|
+Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+Instruction: Based on the context, follow "Format example", write content.
|
|
|
|
|
|
---------
|
|
|
+#Context
|
|
|
## 参考资料
|
|
|
课程名字:${this.courseName}
|
|
|
${sub.length ? '学科:' + sub.join(",") : ''}
|
|
@@ -13870,15 +13906,13 @@ ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
|
|
|
${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
|
|
|
|
|
|
---------
|
|
|
## 要求
|
|
|
-${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品,格式参考## Format example
|
|
|
+${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品
|
|
|
|
|
|
---------
|
|
|
## Format example
|
|
|
--课程简要描述:
|
|
|
--驱动性问题:**1个**驱动整个项目的问题
|
|
|
--最终作品:对应解决驱动性问题的作品,可个人可团队`
|
|
|
+课程简要描述:课程内容的简单叙述。
|
|
|
+驱动性问题:1个驱动整个项目的问题。
|
|
|
+最终作品:对应解决驱动性问题的作品,可个人可团队。`
|
|
|
this.aiGet(msg)
|
|
|
},
|
|
|
setUnitJson() {
|
|
@@ -13922,7 +13956,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
// })
|
|
|
let params = {
|
|
|
assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
- message: [{"type":"text", "text":messages}],
|
|
|
+ message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
@@ -13968,6 +14002,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -13979,6 +14014,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
this.ttextLoading = false
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -13992,7 +14028,10 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.courseText = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.courseText = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.textLoading = false
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -14788,50 +14827,16 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
|
// dArray = JSON.parse(jsonString);
|
|
|
} catch (error) {
|
|
|
console.log("error_________________" + error);
|
|
|
+ _this.loading = false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- _this.teacherText = JSON.parse(JSON.stringify(dArray))
|
|
|
- if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
- for (var i = 0; i < dArray.length; i++) {
|
|
|
- let _task = dArray[i]
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
- task: _task.task,
|
|
|
- taskDetail: "",
|
|
|
- taskDetail2: "",
|
|
|
- taskDetail3: _task.detail,
|
|
|
- chapterData: [],
|
|
|
- toolText: "",
|
|
|
- toolChoose: [
|
|
|
- {
|
|
|
- tool: [],
|
|
|
- toolDetail: "",
|
|
|
- toolType: 0,
|
|
|
- askCount: 1,
|
|
|
- askTitle: "",
|
|
|
- askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- },
|
|
|
- ],
|
|
|
- isShowTools: false,
|
|
|
- askCount: 1,
|
|
|
- isFold: 2,
|
|
|
- askTitle: "",
|
|
|
- askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
- homeworkList: [],
|
|
|
- })
|
|
|
- }
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
|
|
|
- _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
- _this.$forceUpdate();
|
|
|
- } else {
|
|
|
- for (var i = 0; i < dArray.length; i++) {
|
|
|
- let _task = dArray[i]
|
|
|
- if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
|
|
|
- }else {
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson[i] = {
|
|
|
+ try {
|
|
|
+ _this.teacherText = JSON.parse(JSON.stringify(dArray))
|
|
|
+ if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
+ for (var i = 0; i < dArray.length; i++) {
|
|
|
+ let _task = dArray[i]
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
task: _task.task,
|
|
|
taskDetail: "",
|
|
|
taskDetail2: "",
|
|
@@ -14855,12 +14860,52 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
homeworkList: [],
|
|
|
+ })
|
|
|
+ }
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
|
|
|
+ _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
+ _this.$forceUpdate();
|
|
|
+ } else {
|
|
|
+ for (var i = 0; i < dArray.length; i++) {
|
|
|
+ let _task = dArray[i]
|
|
|
+ if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
|
|
|
+ }else {
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i] = {
|
|
|
+ task: _task.task,
|
|
|
+ taskDetail: "",
|
|
|
+ taskDetail2: "",
|
|
|
+ taskDetail3: _task.detail,
|
|
|
+ chapterData: [],
|
|
|
+ toolText: "",
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: [],
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ isShowTools: false,
|
|
|
+ askCount: 1,
|
|
|
+ isFold: 2,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
+ homeworkList: [],
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
+ _this.$forceUpdate();
|
|
|
}
|
|
|
- _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
- _this.$forceUpdate();
|
|
|
+ } catch (error) {
|
|
|
+ console.log("error_________________" + error);
|
|
|
+ _this.loading = false
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
callback ? callback() : ''
|
|
|
})
|
|
@@ -14896,18 +14941,21 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
|
url.push(this.infoData[i].url)
|
|
|
}
|
|
|
}
|
|
|
- let messages = `
|
|
|
+ let messages = `NOTICE
|
|
|
+Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+Instruction: Based on the context, follow "Format example", write content.
|
|
|
|
|
|
---------
|
|
|
+#Context
|
|
|
## 要求
|
|
|
-${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
+${msg}
|
|
|
|
|
|
---------
|
|
|
-## 教学任务描述
|
|
|
+## 参考信息
|
|
|
任务名称:${_this.aiCallBack.task}
|
|
|
-大纲描述:${_this.aiCallBack.taskDetail2}`
|
|
|
+
|
|
|
+## 优化内容
|
|
|
+大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
|
|
|
|
|
|
// -------- #补充参考资料和
|
|
|
// ## 补充参考资料
|
|
@@ -14933,7 +14981,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
// })
|
|
|
let params = {
|
|
|
assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
- message: [{"type":"text", "text":messages}],
|
|
|
+ message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
@@ -14983,6 +15031,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -14994,6 +15043,7 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15006,8 +15056,11 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
_mdText = _mdText.replace(/\\n/g, "\n");
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
- //转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
|
|
|
+ //转化返回的回复流数据.
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15036,22 +15089,24 @@ ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
|
|
|
}
|
|
|
|
|
|
|
|
|
- let messages = `
|
|
|
+ let messages = `NOTICE
|
|
|
+Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+Instruction: Based on the context, follow "Format example", write content.
|
|
|
|
|
|
---------
|
|
|
+#Context
|
|
|
## 要求
|
|
|
${msg}
|
|
|
|
|
|
---------
|
|
|
-## 优化信息
|
|
|
+## 参考资料
|
|
|
任务名字: ${_this.aiCallBack.task}
|
|
|
-任务描述: ${_this.aiCallBack.taskDetail}
|
|
|
|
|
|
-# 格式与要求
|
|
|
-- 任务名:
|
|
|
-- 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
|
|
|
+## 优化信息
|
|
|
+${_this.aiCallBack.taskDetail}
|
|
|
+
|
|
|
+# Format example
|
|
|
+任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
|
|
|
_this.taskDetailLoading2.push(_tindex)
|
|
|
_this.ttaskDetailLoading2.push(_tindex)
|
|
|
let _uuid = uuidv4();
|
|
@@ -15072,7 +15127,7 @@ ${msg}
|
|
|
// })
|
|
|
let params = {
|
|
|
assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
- message: [{"type":"text", "text":messages}],
|
|
|
+ message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
@@ -15120,6 +15175,7 @@ ${msg}
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15131,6 +15187,7 @@ ${msg}
|
|
|
this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15144,7 +15201,10 @@ ${msg}
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15174,23 +15234,24 @@ ${msg}
|
|
|
}
|
|
|
|
|
|
// **重点考虑该任务及工具名和工具内容的情况下*
|
|
|
- let messages = `
|
|
|
+ let messages = `NOTICE
|
|
|
+Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
+ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
|
|
|
+Instruction: Based on the context, follow "Format example", write content.
|
|
|
|
|
|
---------
|
|
|
+#Context
|
|
|
## 参考内容
|
|
|
任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
|
|
|
任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
|
|
|
-工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]] : '无'}
|
|
|
+工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]].name : '无'}
|
|
|
工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
|
|
|
|
|
|
---------
|
|
|
## 要求
|
|
|
${msg} 输出格式和内容要求参考#格式与要求
|
|
|
|
|
|
-# 格式与要求
|
|
|
--工具指引:以友好,明确的口吻告诉学生该如何使用该工具`
|
|
|
+# Format example
|
|
|
+工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
|
|
|
_this.taskDetailLoading3.push(_tindex)
|
|
|
_this.ttaskDetailLoading3.push(_tindex)
|
|
|
let _uuid = uuidv4();
|
|
@@ -15211,7 +15272,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
// })
|
|
|
let params = {
|
|
|
assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
- message: [{"type":"text", "text":messages}],
|
|
|
+ message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: _uuid,
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
@@ -15259,6 +15320,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15270,6 +15332,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15283,7 +15346,10 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
|
|
|
// 处理流数据
|
|
|
}
|
|
@@ -15547,6 +15613,7 @@ ${_text2}`
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15558,6 +15625,7 @@ ${_text2}`
|
|
|
this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15571,8 +15639,13 @@ ${_text2}`
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
- this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
+ if(this.taskDetailLoading5.indexOf(loading) !== -1){
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ }
|
|
|
// 处理流数据
|
|
|
}
|
|
|
// this.$forceUpdate();
|
|
@@ -15606,15 +15679,14 @@ ${_text2}`
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- let messages = `
|
|
|
+ let messages = `NOTICE
|
|
|
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
|
|
|
---------
|
|
|
+#Context
|
|
|
## 要求
|
|
|
${msg}
|
|
|
|
|
|
--------
|
|
|
## 补充描述
|
|
|
课程简要描述:${_this.courseText}
|
|
|
任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
|
|
@@ -15691,7 +15763,10 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
- _source.onmessage = _e => {
|
|
|
+ this.allTextArray[_tindex2] = ""
|
|
|
+ let _iindex = 0
|
|
|
+ _source.onmessage = async (_e) => {
|
|
|
+ // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
//对话已经完成
|
|
@@ -15702,6 +15777,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15715,13 +15791,45 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
- this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
+ if(this.taskDetailLoading5.indexOf(loading) !== -1){
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ }
|
|
|
// 处理流数据
|
|
|
}
|
|
|
- // this.$forceUpdate();
|
|
|
};
|
|
|
},
|
|
|
+ aiDetail52getAiContentText(_e, loading, _tindex2, _source){
|
|
|
+ let _mdText = "";
|
|
|
+ let _eData = JSON.parse(_e.data).content;
|
|
|
+ if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
+ //对话已经完成
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
|
|
|
+ _source.close();
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ //对话还在继续
|
|
|
+ let _text = "";
|
|
|
+ _text = _eData.replaceAll("'", "");
|
|
|
+ if (this.allTextArray[_tindex2] == "") {
|
|
|
+ this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
|
|
|
+ } else {
|
|
|
+ this.allTextArray[_tindex2] += _text;
|
|
|
+ }
|
|
|
+ _mdText = this.allTextArray[_tindex2] + "_";
|
|
|
+ _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
|
|
|
+ _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
|
|
|
+ if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
+ this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
|
|
|
+ this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
|
|
|
+ // 处理流数据
|
|
|
+ }
|
|
|
+ },
|
|
|
async aiCpote(msg, callback) {
|
|
|
let _this = this
|
|
|
let _index = _this.aitype.replace("aiC","c")
|
|
@@ -15767,9 +15875,9 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描
|
|
|
// ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
|
|
|
// ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
|
|
|
|
|
|
- let messages = `
|
|
|
+ let messages = `NOTICE
|
|
|
+Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
|
|
|
Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
|
|
|
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
|
|
|
|
|
|
${msg}
|
|
|
|
|
@@ -15853,6 +15961,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
// let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
|
|
|
let _allText = "";
|
|
|
let _mdText = "";
|
|
|
+ let _iindex = 0
|
|
|
_source.onmessage = _e => {
|
|
|
let _eData = JSON.parse(_e.data).content;
|
|
|
if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
|
|
@@ -15865,6 +15974,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
callback ? callback() : ''
|
|
|
return;
|
|
|
} else {
|
|
|
+ _iindex++
|
|
|
//对话还在继续
|
|
|
let _text = "";
|
|
|
_text = _eData.replaceAll("'", "");
|
|
@@ -15878,7 +15988,10 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
_mdText = _mdText.replace(/\\/g, "");
|
|
|
if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
|
|
|
//转化返回的回复流数据
|
|
|
- this.cpote[loading] = _mdText;
|
|
|
+ if(_iindex == 10){
|
|
|
+ this.cpote[loading] = _mdText;
|
|
|
+ _iindex = 0
|
|
|
+ }
|
|
|
this.cpoteLoading[loading] = false
|
|
|
// 处理流数据
|
|
|
}
|