|
@@ -364,6 +364,7 @@
|
|
</div> -->
|
|
</div> -->
|
|
<div style="margin-top: 10px;display: flex;justify-content: flex-end;">
|
|
<div style="margin-top: 10px;display: flex;justify-content: flex-end;">
|
|
<el-button @click="opQvisible0 = false">取消</el-button>
|
|
<el-button @click="opQvisible0 = false">取消</el-button>
|
|
|
|
+ <el-button style="background: #1456F0;" @click="markScoAuto()" type="primary">自动评分</el-button>
|
|
<el-button style="background: #1456F0;" @click="markSco()" type="primary">运行</el-button>
|
|
<el-button style="background: #1456F0;" @click="markSco()" type="primary">运行</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -2155,7 +2156,7 @@ export default {
|
|
fieldList:[]
|
|
fieldList:[]
|
|
},
|
|
},
|
|
scoList:[],
|
|
scoList:[],
|
|
- scoListCopy:[],
|
|
|
|
|
|
+ scoListCopy:[], //没有什么别的用处只是为了展示用,让表单在评分的过程中不清零
|
|
quoteV:false,
|
|
quoteV:false,
|
|
openCeVal:false,
|
|
openCeVal:false,
|
|
opQvisible:false,
|
|
opQvisible:false,
|
|
@@ -2466,7 +2467,7 @@ export default {
|
|
});
|
|
});
|
|
this.opQvisible = false
|
|
this.opQvisible = false
|
|
},
|
|
},
|
|
- // 点击开始评分
|
|
|
|
|
|
+ // 点击开始评分(全部进行评分)
|
|
async markSco(){
|
|
async markSco(){
|
|
if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
@@ -2645,6 +2646,190 @@ ${JSON.stringify(forAllList)}
|
|
console.log(error);
|
|
console.log(error);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 点击开始自动评分(未评分得数据进行评分)
|
|
|
|
+ async markScoAuto(){
|
|
|
|
+ let scoid = this.scoList.map(e=> e.id);
|
|
|
|
+ console.log('scoid',scoid);
|
|
|
|
+ let TabArr = this.tableWorksArray.filter(e=> scoid.indexOf(e.id) == -1)
|
|
|
|
+
|
|
|
|
+ console.log('this.TabArr',TabArr);
|
|
|
|
+ if (!TabArr.length) return this.$message.error('已全部评分')
|
|
|
|
+
|
|
|
|
+ if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
|
|
|
|
+ if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
|
|
|
|
+ if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
|
|
|
|
+ this.aiscoLoading = true
|
|
|
|
+
|
|
|
|
+ let forAllList = [];
|
|
|
|
+ this.scoList = []
|
|
|
|
+
|
|
|
|
+ // 进行整理数据,将用户回答都存在一个数组里
|
|
|
|
+ for (let kin = 0; kin < TabArr.length; kin++) {
|
|
|
|
+ let userWork = []
|
|
|
|
+ let _fileid = []
|
|
|
|
+
|
|
|
|
+ let kpl = TabArr[kin].array
|
|
|
|
+ // console.log('kpl',this.TabArr[kin]);
|
|
|
|
+
|
|
|
|
+ for (let index = 0; index < kpl.length; index++) {
|
|
|
|
+ if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ if (kpl[index].json.file && kpl[index].json.file[0].url) {
|
|
|
|
+ _fileid.push(kpl[index].json.file[0].url)
|
|
|
|
+ }
|
|
|
|
+ userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
|
|
|
|
+ }
|
|
|
|
+ if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
|
|
|
|
+ let kk = []
|
|
|
|
+ kpl[index].json.answer2.forEach((e)=>{
|
|
|
|
+ kk.push(kpl[index].json.array[e].option)
|
|
|
|
+ })
|
|
|
|
+ userWork.push(kpl[index].json.title+':' +kk.join(','))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+let info = [
|
|
|
|
+ this.cueWord.fieldList.includes('序号') ? '序号' + (kin + 1) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('提交人') ? '提交人:' + TabArr[kin].name : '',
|
|
|
|
+ this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, TabArr[kin].cclassid) : '',
|
|
|
|
+ this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + TabArr[kin].time : '',
|
|
|
|
+ userWork.filter(Boolean).join('\n')
|
|
|
|
+].filter(Boolean).join('\n');
|
|
|
|
+ forAllList.push({id:TabArr[kin].id,data:info})
|
|
|
|
+ // console.log('info',info);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // console.log('forAllList',forAllList);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let messages = `
|
|
|
|
+NOTICE
|
|
|
|
+Role: 你是一个高级数据处理师。
|
|
|
|
+- 深入理解各种数据处理标准,确保处理流程的准确性。
|
|
|
|
+- 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
|
|
|
|
+- 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
|
|
|
|
+- 有丰富的数据处理经验,能应对多种类型的数据操作。
|
|
|
|
+- 拥有精准的数据分析能力,准确得出处理结果。
|
|
|
|
+- 擅长根据不同评价标准进行数据评价,保证结果符合要求。
|
|
|
|
+- 能够高效地处理大量数据,保证工作的时效性。
|
|
|
|
+Language: ${this.getLang()}
|
|
|
|
+
|
|
|
|
+## 上下文
|
|
|
|
+在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
|
|
|
|
+
|
|
|
|
+## 数据处理标准
|
|
|
|
+${this.cueWord.openCeCon}
|
|
|
|
+
|
|
|
|
+## 数据内容
|
|
|
|
+${JSON.stringify(forAllList)}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 任务
|
|
|
|
+1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
|
|
|
|
+2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
|
|
|
|
+3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
|
|
|
|
+4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
|
|
|
|
+5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
|
|
|
|
+
|
|
|
|
+### 理论框架
|
|
|
|
+### 数据生命周期管理理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
|
|
|
|
+- 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
|
|
|
|
+- 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
|
|
|
|
+- 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
|
|
|
|
+
|
|
|
|
+### ETL(Extract,Transform,Load)理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
|
|
|
|
+- 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 数据抽取:从多组文本数据中提取所需的字段和内容。
|
|
|
|
+- 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
|
|
|
|
+- 数据加载:将处理好的数据加载到合适的存储或输出结构中。
|
|
|
|
+
|
|
|
|
+### 数据质量评估理论
|
|
|
|
+1. 基本原理:
|
|
|
|
+- 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
|
|
|
|
+- 不同的数据用途有不同的质量要求,需建立相应评估指标。
|
|
|
|
+2. 具体应用:
|
|
|
|
+- 质量指标确定:根据处理标准确定数据质量评估指标。
|
|
|
|
+- 数据检查:按照指标对处理过程中的数据进行检查。
|
|
|
|
+- 结果验证:依据评估结果验证最终输出的数据是否符合要求。
|
|
|
|
+
|
|
|
|
+##响应
|
|
|
|
+严格按照用户的需求进行输出,不要输出多余的内容
|
|
|
|
+
|
|
|
|
+## 要求
|
|
|
|
+- 以清晰的逻辑构建处理流程,步骤分明。
|
|
|
|
+- 对数据内容进行全面分析,不遗漏任何关键信息。
|
|
|
|
+- 根据评价标准严格进行评价操作,保证结果的公正性。
|
|
|
|
+- 处理结果输出简洁明了,仅包含符合要求的内容。
|
|
|
|
+- 考虑到可能存在的多种数据结构,保持处理方法的通用性。
|
|
|
|
+- 针对数据处理过程中的特殊情况提供应对措施。
|
|
|
|
+- 以专业的态度对待数据,确保数据的安全性与完整性。
|
|
|
|
+- 输出格式[{id:数据id,sco:评分}]。
|
|
|
|
+- 不输出分析过程,直接输出最后计算结果。
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 限制
|
|
|
|
+- 不应包含未经定义的数据处理术语,以免造成混淆。
|
|
|
|
+- 避免输出与数据处理标准无关的内容。
|
|
|
|
+- 不应包含模糊不清的处理步骤或操作。
|
|
|
|
+- 避免提及无法获取的外部工具或资源,除非有替代方案。
|
|
|
|
+- 不应包含未经证实的数据处理假设。
|
|
|
|
+- 不要回复你不知道的内容
|
|
|
|
+- 不要直接回复<demo>的内容
|
|
|
|
+- 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
|
|
|
|
+- 请使用准确可靠的信息来源,确保规划的可行性和实用性。
|
|
|
|
+- 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
|
|
|
|
+- 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
|
|
|
|
+
|
|
|
|
+ // console.log('messages',messages);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let params = {
|
|
|
|
+ assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
|
|
|
|
+ message: [
|
|
|
|
+ {
|
|
|
|
+ type: "text",
|
|
|
|
+ text: messages.replaceAll("\n", " ").replaceAll("*", "")
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ session_name: uuidv4(),
|
|
|
|
+ userId: this.userid,
|
|
|
|
+ file_ids: '',
|
|
|
|
+ model: "gpt-4o-2024-11-20"
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
|
|
|
|
+ .then(response => {
|
|
|
|
+ let data = response.data.FunctionResponse;
|
|
|
|
+ this.scoList = JSON.parse(data.message)
|
|
|
|
+ this.aiscoLoading = false
|
|
|
|
+
|
|
|
|
+ this.uploadSCo(1)
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ this.aiscoLoading = false
|
|
|
|
+ this.$message.error('评分失败')
|
|
|
|
+ reject(error)
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 获取评分
|
|
// 获取评分
|
|
async getAiSco(){
|
|
async getAiSco(){
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
@@ -2690,13 +2875,21 @@ ${JSON.stringify(forAllList)}
|
|
|
|
|
|
},
|
|
},
|
|
// 上传评分
|
|
// 上传评分
|
|
- uploadSCo(){
|
|
|
|
|
|
+ uploadSCo(val){
|
|
this.aiscoLoading = true
|
|
this.aiscoLoading = true
|
|
|
|
|
|
|
|
+ // val有数据就是自动评分把将新老数据结合在一起
|
|
|
|
+ let scoArr = []
|
|
|
|
+ if (val) {
|
|
|
|
+ scoArr = [...this.scoList,...this.scoListCopy]
|
|
|
|
+ }else{
|
|
|
|
+ scoArr = this.scoList
|
|
|
|
+ }
|
|
|
|
+
|
|
let params = [{
|
|
let params = [{
|
|
tid:this.cid,
|
|
tid:this.cid,
|
|
- uid:'6063369f-289a-11ef-8bf4-12e77c4cb76b',
|
|
|
|
- json:JSON.stringify(this.scoList),
|
|
|
|
|
|
+ uid:this.userid,
|
|
|
|
+ json:JSON.stringify(scoArr),
|
|
cw: JSON.stringify(this.cueWord)
|
|
cw: JSON.stringify(this.cueWord)
|
|
}]
|
|
}]
|
|
// console.log('params',params);
|
|
// console.log('params',params);
|