lsc 11 月之前
父節點
當前提交
e70865b425

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.abc09cbcb03529102ceb56d0381520dd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.3cd0a0187ca1f70ded67.js></script><script type=text/javascript src=./static/js/app.cf3c66de91c9640f02c0.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.a1937d9b44cf342d80e25a1b0d025b3f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.3cd0a0187ca1f70ded67.js></script><script type=text/javascript src=./static/js/app.519ee88f1c440d1c7f67.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.a1937d9b44cf342d80e25a1b0d025b3f.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.a1937d9b44cf342d80e25a1b0d025b3f.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.abc09cbcb03529102ceb56d0381520dd.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.abc09cbcb03529102ceb56d0381520dd.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.519ee88f1c440d1c7f67.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.519ee88f1c440d1c7f67.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.js.map


+ 231 - 231
src/components/pages/aiAddCourse/addCourse.vue

@@ -12897,79 +12897,42 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
     },
     aiGet2(messages, callback) {
       let _this = this
-      // let params = JSON.stringify({
-      //   // "model": "Chat",
-      //   model: 'gpt-3.5-turbo',
-      //   temperature: 0,
-      //   max_tokens: 4096,
-      //   top_p: 1,
-      //   frequency_penalty: 0,
-      //   presence_penalty: 0,
-      //   messages: [{
-      //     content: messages,
-      //     role: 'user'
-      //   }],
-      //   stream: false,
-      //   uid: this.userid,
-      //   mind_map_question: "",
-      // })
       let params = JSON.stringify({
-          message: {
-              anthropic_version: "bedrock-2023-05-31",
-              max_tokens: 4096,
-              temperature: 0,
-              top_p: 1,
-              messages: [{
-                content: messages,
-                role: 'user'
-              }], // 
-          },
-          model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
-      });
-      // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
-      _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
+        // "model": "Chat",
+        model: 'gpt-3.5-turbo',
+        temperature: 0,
+        max_tokens: 4096,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [{
+          content: messages,
+          role: 'user'
+        }],
+        stream: false,
+        uid: this.userid,
+        mind_map_question: "",
+      })
+      // let params = JSON.stringify({
+      //     message: {
+      //         anthropic_version: "bedrock-2023-05-31",
+      //         max_tokens: 4096,
+      //         temperature: 0,
+      //         top_p: 1,
+      //         messages: [{
+      //           content: messages,
+      //           role: 'user'
+      //         }], // 
+      //     },
+      //     model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      // });
+      _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
+      // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
         console.log(response);
         let data = response.data.FunctionResponse
-        // if (data.choices && data.choices.length && data.choices[0].message) {
-        //   console.log(data.choices[0].message.content);
-        //   let dArray = JSON.parse(data.choices[0].message.content)
-        //   _this.dArray = dArray
-        //   _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: _task.detail,
-        //       taskDetail3: "",
-        //       chapterData: [],
-        //       toolText: "",
-        //       toolChoose: [
-        //         {
-        //           tool: [],
-        //           toolDetail: "",
-        //           toolType: 0,
-        //           askCount: 1,
-        //           askTitle: "",
-        //           askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-        //         },
-        //       ],
-        //       isShowTools: false,
-        //       askCount: 1,
-        //       isFold: 1,
-        //       askTitle: "",
-        //       askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-        //       checkJson: [{ checkCount: [], checkPerent: [] }],
-        //       homeworkList: [],
-        //     })
-        //   }
-        //   _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
-        //   _this.$forceUpdate();
-        // }
-        if (data.result) {
-          console.log(data.result);
-          let dArray = JSON.parse(data.result)
+        if (data.choices && data.choices.length && data.choices[0].message) {
+          console.log(data.choices[0].message.content);
+          let dArray = JSON.parse(data.choices[0].message.content)
           _this.dArray = dArray
           _this.unitJson[0].chapterInfo[0].taskJson = []
 
@@ -13004,79 +12967,22 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
           _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
           _this.$forceUpdate();
         }
-        callback ? callback() : ''
-      }).catch(function (error) {
-        _this.loading = false
-        console.log(error);
-      });
-    },
-    aiGet3(messages, callback) {
-      let _this = this
-      // let params = JSON.stringify({
-      //   // "model": "Chat",
-      //   model: 'gpt-3.5-turbo',
-      //   temperature: 0,
-      //   max_tokens: 4096,
-      //   top_p: 1,
-      //   frequency_penalty: 0,
-      //   presence_penalty: 0,
-      //   messages: [{
-      //     content: messages,
-      //     role: 'user'
-      //   }],
-      //   stream: false,
-      //   uid: this.userid,
-      //   mind_map_question: "",
-      // })
-      let params = JSON.stringify({
-          message: {
-              anthropic_version: "bedrock-2023-05-31",
-              max_tokens: 4096,
-              temperature: 0,
-              top_p: 1,
-              messages: [{
-                content: messages,
-                role: 'user'
-              }], // 
-          },
-          model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
-      });
-      // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
-      _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
-        console.log(response);
-        let data = response.data.FunctionResponse
-        // if (data.choices && data.choices.length && data.choices[0].message) {
-        //   console.log(data.choices[0].message.content);
-        //   let tArray = JSON.parse(data.choices[0].message.content)
-        //   // _this.unitJson[0].chapterInfo[0].task = []
+        // if (data.result) {
+        //   console.log(data.result);
+        //   let dArray = JSON.parse(data.result)
+        //   _this.dArray = dArray
+        //   _this.unitJson[0].chapterInfo[0].taskJson = []
 
-        //   let toolsJson = {
-        //     "电子白板": { tool: 1, type: 1 },
-        //     "文档": { tool: 52, type: 1 },
-        //     "思维导图": { tool: 3, type: 1 },
-        //     "表格": { tool: 48, type: 1 },
-        //     "作业提交": { tool: 16, type: 2 }
-        //   }
-        //   for (var i = 0; i < tArray.length; i++) {
-        //     let _task = tArray[i]
-        //     _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
-        //     _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
-        //     _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
-        //     if (_task.toolChoose.length) {
-        //       for (var j = 0; j < _task.toolChoose.length; j++) {
-        //         _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
-        //           {
-        //             tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
-        //             toolDetail: _task.toolChoose[j].detail,
-        //             toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
-        //             askCount: 1,
-        //             askTitle: "",
-        //             askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-        //           },
-        //         )
-        //       }
-        //     } else {
-        //       _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
+        //   for (var i = 0; i < dArray.length; i++) {
+        //     let _task = dArray[i]
+        //     _this.unitJson[0].chapterInfo[0].taskJson.push({
+        //       task: _task.task,
+        //       taskDetail: "",
+        //       taskDetail2: _task.detail,
+        //       taskDetail3: "",
+        //       chapterData: [],
+        //       toolText: "",
+        //       toolChoose: [
         //         {
         //           tool: [],
         //           toolDetail: "",
@@ -13085,15 +12991,63 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
         //           askTitle: "",
         //           askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
         //         },
-        //       )
-        //     }
+        //       ],
+        //       isShowTools: false,
+        //       askCount: 1,
+        //       isFold: 1,
+        //       askTitle: "",
+        //       askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
+        //       checkJson: [{ checkCount: [], checkPerent: [] }],
+        //       homeworkList: [],
+        //     })
         //   }
         //   _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
         //   _this.$forceUpdate();
         // }
-        if (data.result) {
-          console.log(data.result);
-          let tArray = JSON.parse(data.result)
+        callback ? callback() : ''
+      }).catch(function (error) {
+        _this.loading = false
+        console.log(error);
+      });
+    },
+    aiGet3(messages, callback) {
+      let _this = this
+      let params = JSON.stringify({
+        // "model": "Chat",
+        model: 'gpt-3.5-turbo',
+        temperature: 0,
+        max_tokens: 4096,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [{
+          content: messages,
+          role: 'user'
+        }],
+        stream: false,
+        uid: this.userid,
+        mind_map_question: "",
+      })
+      // let params = JSON.stringify({
+      //     message: {
+      //         anthropic_version: "bedrock-2023-05-31",
+      //         max_tokens: 4096,
+      //         temperature: 0,
+      //         top_p: 1,
+      //         messages: [{
+      //           content: messages,
+      //           role: 'user'
+      //         }], // 
+      //     },
+      //     model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      // });
+      _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
+      // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
+        console.log(response);
+        let data = response.data.FunctionResponse
+        if (data.choices && data.choices.length && data.choices[0].message) {
+          console.log(data.choices[0].message.content);
+          let tArray = JSON.parse(data.choices[0].message.content)
           // _this.unitJson[0].chapterInfo[0].task = []
 
           let toolsJson = {
@@ -13137,6 +13091,52 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
           _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
           _this.$forceUpdate();
         }
+        // if (data.result) {
+        //   console.log(data.result);
+        //   let tArray = JSON.parse(data.result)
+        //   // _this.unitJson[0].chapterInfo[0].task = []
+
+        //   let toolsJson = {
+        //     "电子白板": { tool: 1, type: 1 },
+        //     "文档": { tool: 52, type: 1 },
+        //     "思维导图": { tool: 3, type: 1 },
+        //     "表格": { tool: 48, type: 1 },
+        //     "作业提交": { tool: 16, type: 2 }
+        //   }
+        //   for (var i = 0; i < tArray.length; i++) {
+        //     let _task = tArray[i]
+        //     _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
+        //     _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
+        //     _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
+        //     if (_task.toolChoose.length) {
+        //       for (var j = 0; j < _task.toolChoose.length; j++) {
+        //         _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
+        //           {
+        //             tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
+        //             toolDetail: _task.toolChoose[j].detail,
+        //             toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
+        //             askCount: 1,
+        //             askTitle: "",
+        //             askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
+        //           },
+        //         )
+        //       }
+        //     } else {
+        //       _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
+        //         {
+        //           tool: [],
+        //           toolDetail: "",
+        //           toolType: 0,
+        //           askCount: 1,
+        //           askTitle: "",
+        //           askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
+        //         },
+        //       )
+        //     }
+        //   }
+        //   _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
+        //   _this.$forceUpdate();
+        // }
         callback ? callback() : ''
       }).catch(function (error) {
         _this.loading = false
@@ -13145,55 +13145,43 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
     },
     aiGet4(messages, callback, clickType) {
       let _this = this
-      // let params = JSON.stringify({
-      //   // "model": "Chat",
-      //   model: 'gpt-3.5-turbo',
-      //   temperature: 0,
-      //   max_tokens: 4096,
-      //   top_p: 1,
-      //   frequency_penalty: 0,
-      //   presence_penalty: 0,
-      //   messages: [{
-      //     content: messages,
-      //     role: 'user'
-      //   }],
-      //   stream: false,
-      //   uid: this.userid,
-      //   mind_map_question: "",
-      // })
       let params = JSON.stringify({
-          message: {
-              anthropic_version: "bedrock-2023-05-31",
-              max_tokens: 4096,
-              temperature: 0,
-              top_p: 1,
-              messages: [{
-                content: messages,
-                role: 'user'
-              }], // 
-          },
-          model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
-      });
-      // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
-      _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
+        // "model": "Chat",
+        model: 'gpt-3.5-turbo',
+        temperature: 0,
+        max_tokens: 4096,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [{
+          content: messages,
+          role: 'user'
+        }],
+        stream: false,
+        uid: this.userid,
+        mind_map_question: "",
+      })
+      // let params = JSON.stringify({
+      //     message: {
+      //         anthropic_version: "bedrock-2023-05-31",
+      //         max_tokens: 4096,
+      //         temperature: 0,
+      //         top_p: 1,
+      //         messages: [{
+      //           content: messages,
+      //           role: 'user'
+      //         }], // 
+      //     },
+      //     model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      // });
+      _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
+      // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
         console.log(response);
         let data = response.data.FunctionResponse
-        // if (data.choices && data.choices.length && data.choices[0].message) {
-        //   console.log(data.choices[0].message.content);
-        //   let dArray = JSON.parse(data.choices[0].message.content)
-        //   _this.teacherText =  JSON.parse(data.choices[0].message.content)
-
-        //   for (var i = 0; i < dArray.length; i++) {
-        //     let _task = dArray[i]
-        //     _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
-        //   }
-        //   _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
-        //   _this.$forceUpdate();
-        // }
-        if (data.result) {
-          console.log(data.result);
-          let dArray = JSON.parse(data.result)
-          _this.teacherText =  JSON.parse(data.result)
+        if (data.choices && data.choices.length && data.choices[0].message) {
+          console.log(data.choices[0].message.content);
+          let dArray = JSON.parse(data.choices[0].message.content)
+          _this.teacherText =  JSON.parse(data.choices[0].message.content)
 
           for (var i = 0; i < dArray.length; i++) {
             let _task = dArray[i]
@@ -13202,6 +13190,18 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
           _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
           _this.$forceUpdate();
         }
+        // if (data.result) {
+        //   console.log(data.result);
+        //   let dArray = JSON.parse(data.result)
+        //   _this.teacherText =  JSON.parse(data.result)
+
+        //   for (var i = 0; i < dArray.length; i++) {
+        //     let _task = dArray[i]
+        //     _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
+        //   }
+        //   _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
+        //   _this.$forceUpdate();
+        // }
         callback ? callback() : ''
         _this.loading = false
       }).catch(function (error) {
@@ -13577,49 +13577,49 @@ ${msg} 输出格式和内容要求参考# 格式与要求
   {"value":"评价维度3","detail":"维度描述3","score":5}
 ]`
       _this.taskDetailLoading4.push(_tindex)
-      // let params = JSON.stringify({
-      //   // "model": "Chat",
-      //   model: 'gpt-3.5-turbo',
-      //   temperature: 0,
-      //   max_tokens: 4096,
-      //   top_p: 1,
-      //   frequency_penalty: 0,
-      //   presence_penalty: 0,
-      //   messages: [{
-      //     content: messages,
-      //     role: 'user'
-      //   }],
-      //   stream: false,
-      //   uid: this.userid,
-      //   mind_map_question: "",
-      // })
       let params = JSON.stringify({
-          message: {
-              anthropic_version: "bedrock-2023-05-31",
-              max_tokens: 4096,
-              temperature: 0,
-              top_p: 1,
-              messages: [{
-                content: messages,
-                role: 'user'
-              }], // 
-          },
-          model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
-      });
-      // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
-      _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
+        // "model": "Chat",
+        model: 'gpt-3.5-turbo',
+        temperature: 0,
+        max_tokens: 4096,
+        top_p: 1,
+        frequency_penalty: 0,
+        presence_penalty: 0,
+        messages: [{
+          content: messages,
+          role: 'user'
+        }],
+        stream: false,
+        uid: this.userid,
+        mind_map_question: "",
+      })
+      // let params = JSON.stringify({
+      //     message: {
+      //         anthropic_version: "bedrock-2023-05-31",
+      //         max_tokens: 4096,
+      //         temperature: 0,
+      //         top_p: 1,
+      //         messages: [{
+      //           content: messages,
+      //           role: 'user'
+      //         }], // 
+      //     },
+      //     model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
+      // });
+      _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
+      // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
         console.log(response);
         let data = response.data.FunctionResponse
-        // if (data.choices && data.choices.length && data.choices[0].message) {
-        //   console.log(data.choices[0].message.content);
-        //   _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
-        //   _this.$forceUpdate()
-        // }
-        if (data.result) {
-          console.log(data.result);
-          _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
+        if (data.choices && data.choices.length && data.choices[0].message) {
+          console.log(data.choices[0].message.content);
+          _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
           _this.$forceUpdate()
         }
+        // if (data.result) {
+        //   console.log(data.result);
+        //   _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
+        //   _this.$forceUpdate()
+        // }
         _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
       }).catch(function (error) {
         _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)

部分文件因文件數量過多而無法顯示