|
@@ -919,11 +919,11 @@
|
|
|
<div class="c_info_title">
|
|
|
课程目标
|
|
|
<el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
- <button class="c_pub_button_confirm" style="margin: 0px 5px 0px auto;"
|
|
|
+ <button class="c_pub_button_confirm" style="margin: 0px 20px 0px auto;"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
|
|
|
@click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标</button>
|
|
|
</el-tooltip>
|
|
|
- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
|
|
|
<button class="c_pub_button_confirm" style="margin: 0 20px 0 0;"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
|
|
|
@click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标2</button>
|
|
@@ -15814,6 +15814,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -16032,6 +16033,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -16064,6 +16066,8 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
|
|
|
|
|
|
} catch (error) {
|
|
|
+ _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
|
|
|
+ _this.aiGet2(messages, callback);
|
|
|
console.log("error_________________" + error);
|
|
|
}
|
|
|
console.log("error_________________" + error);
|
|
@@ -16296,6 +16300,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -16551,6 +16556,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -16843,6 +16849,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -17103,6 +17110,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -17308,6 +17316,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -17466,6 +17475,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -17702,6 +17712,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
@@ -17935,6 +17946,7 @@ ${msg}
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18095,6 +18107,7 @@ ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').repl
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18222,6 +18235,7 @@ ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18374,6 +18388,7 @@ ${_this.aiCallBack.taskDetail}
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18519,6 +18534,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18669,6 +18685,7 @@ ${msg} 优化评价维度和维度描述,输出格式和内容要求参考#
|
|
|
session_name: uuidv4(),
|
|
|
userId: _this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18812,6 +18829,7 @@ ${_text2}`
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -18966,6 +18984,7 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19166,6 +19185,7 @@ ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19331,6 +19351,7 @@ ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19495,6 +19516,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19645,6 +19667,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19751,6 +19774,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19884,6 +19908,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
userId: _this.userid,
|
|
|
uid: _uuid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
// let params = JSON.stringify({
|
|
|
// message: {
|
|
@@ -19938,7 +19963,7 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
|
this.ruleLoading[i][k] = true
|
|
|
}
|
|
|
let message = `NOTICE
|
|
|
-Role: 你是一个专业的项目式学习导师,你要根据<评价维度>和<维度描述>制定具体的评价细则。
|
|
|
+Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
|
|
|
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.
|
|
@@ -19952,40 +19977,94 @@ ${msg}
|
|
|
维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
|
|
|
|
|
|
# Format example
|
|
|
-== 0 星,作业内容与作业要求无关;
|
|
|
+==
|
|
|
+0 星,作业内容与作业要求无关;
|
|
|
1 星,没有识别问题和需求;
|
|
|
2 星,问题或需求没有被清晰理解或准确识别;
|
|
|
3 星,问题或需求的一部分被识别;
|
|
|
4 星,问题或需求的大部分被识别;
|
|
|
-5 星,问题或需求都被识别。 ==
|
|
|
+5 星,问题或需求都被识别。
|
|
|
+==
|
|
|
|
|
|
`
|
|
|
- let params = {
|
|
|
- // "model": "Chat",
|
|
|
- model: "gpt-4o",
|
|
|
- temperature: 0,
|
|
|
- max_tokens: 4096,
|
|
|
- top_p: 1,
|
|
|
- frequency_penalty: 0,
|
|
|
- presence_penalty: 0,
|
|
|
- messages: [
|
|
|
- {
|
|
|
- content: message.replaceAll("\n", " ").replaceAll("*", ""),
|
|
|
- role: "user"
|
|
|
- }
|
|
|
- ],
|
|
|
- stream: false,
|
|
|
- uid: this.userid,
|
|
|
- mind_map_question: ""
|
|
|
- };
|
|
|
+ // let params = {
|
|
|
+ // // "model": "Chat",
|
|
|
+ // model: 'gpt-4o-2024-08-06',
|
|
|
+ // // model: "gpt-4o",
|
|
|
+ // temperature: 0,
|
|
|
+ // max_tokens: 4096,
|
|
|
+ // top_p: 1,
|
|
|
+ // frequency_penalty: 0,
|
|
|
+ // presence_penalty: 0,
|
|
|
+ // messages: [
|
|
|
+ // {
|
|
|
+ // content: message.replaceAll("\n", " ").replaceAll("*", ""),
|
|
|
+ // role: "user"
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // stream: false,
|
|
|
+ // uid: this.userid,
|
|
|
+ // mind_map_question: ""
|
|
|
+ // };
|
|
|
+
|
|
|
+ // this.ajax
|
|
|
+ // .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
+ // .then(response => {
|
|
|
+ // let data = response.data.FunctionResponse;
|
|
|
+ // console.log("data", data);
|
|
|
+ // if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
+ // let content = data.choices[0].message.content;
|
|
|
+
|
|
|
+ // var regex = new RegExp('==([^=]+)==');
|
|
|
+ // let match = content.match(regex);
|
|
|
+ // if (match) {
|
|
|
+ // content = match[1].trim().replaceAll(' ', '');
|
|
|
+ // // 获取匹配到的内容并去除两端空格
|
|
|
+ // console.log('contentInsideDoubleEquals', content);
|
|
|
+ // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
|
|
|
+ // console.log("未有星级。");
|
|
|
+ // this.againEva(msg, i, k)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // // return
|
|
|
+ // } else {
|
|
|
+ // console.log("未找到匹配的内容。");
|
|
|
+ // this.againEva(msg, i, k)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
+ // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
|
|
|
+ // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
|
|
|
+ // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
|
|
|
+ // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
|
|
|
+ // this.$forceUpdate();
|
|
|
+ // this.ruleLoading[i][k] = false
|
|
|
+
|
|
|
+ // }else{
|
|
|
+ // this.ruleLoading[i][k] = false
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(error => {
|
|
|
+ // console.log(error);
|
|
|
+ // this.ruleLoading[i][k] = false
|
|
|
+ // });
|
|
|
+ let parm = {
|
|
|
+ assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
+ message: [{"type":"text", "text":message.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
+ session_name: uuidv4(),
|
|
|
+ userId: this.userid,
|
|
|
+ file_ids: [],
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
+ }
|
|
|
this.ajax
|
|
|
- .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
- .then(response => {
|
|
|
- let data = response.data.FunctionResponse;
|
|
|
- console.log("data", data);
|
|
|
- if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- let content = data.choices[0].message.content;
|
|
|
+ .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|
|
|
+ .then(async (response) => {
|
|
|
+ console.log(response);
|
|
|
+ let data = response.data.FunctionResponse
|
|
|
+ if (data.message) {
|
|
|
+ console.log(data.message);
|
|
|
+
|
|
|
+ let content = data.message;
|
|
|
|
|
|
var regex = new RegExp('==([^=]+)==');
|
|
|
let match = content.match(regex);
|
|
@@ -20011,14 +20090,16 @@ ${msg}
|
|
|
this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
|
|
|
this.$forceUpdate();
|
|
|
this.ruleLoading[i][k] = false
|
|
|
-
|
|
|
- }else{
|
|
|
+ this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
|
|
|
+ }else {
|
|
|
this.ruleLoading[i][k] = false
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
- .catch(error => {
|
|
|
- console.log(error);
|
|
|
+ .catch((error) => {
|
|
|
this.ruleLoading[i][k] = false
|
|
|
+ console.log(error);
|
|
|
});
|
|
|
},
|
|
|
async aiSearchFile(messages, callback) {
|
|
@@ -20148,6 +20229,7 @@ ${msg}
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
}
|
|
|
this.ajax
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
|