瀏覽代碼

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-student-table into beta

SanHQin 11 月之前
父節點
當前提交
2621c3a3ae

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     body{
       font-family: '黑体';
-    }</style><link href=./static/css/app.8a947da405cea23d88092056f7e91de5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b5a78a47ec38c79eb330.js></script><script type=text/javascript src=./static/js/app.f6aee12a7bc12e8e03ed.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.1df1c0d0469f25f586767b0d9856e3d7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.b5a78a47ec38c79eb330.js></script><script type=text/javascript src=./static/js/app.1617e88e66fbb63beb2f.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

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


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


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


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


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


+ 25 - 57
src/components/easy2/commpont/markScore.vue

@@ -243,46 +243,25 @@ export default {
     aiGet2(messages, callback) {
       // console.log(this.toolIndex, this.wIndex);
       let _this = this;
-      // let parm = {
-      //   assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
-      //   message: [
-      //     {
-      //       type: "text",
-      //       text: messages.replaceAll("\n", " ").replaceAll("*", "")
-      //     }
-      //   ],
-      //   session_name: uuidv4(),
-      //   userId: this.userid,
-      //   file_ids: ""
-      // };
+
       let params = {
-        // "model": "Chat",
-        model: "gpt-4o",
-        temperature: 0,
-        max_tokens: 4096,
-        top_p: 1,
-        frequency_penalty: 0,
-        presence_penalty: 0,
-        messages: [
-          {
-            content: messages.replaceAll("\n", " ").replaceAll("*", ""),
-            role: "user"
-          }
-        ],
-        stream: false,
-        uid: this.userid,
-        mind_map_question: ""
+        assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
+        message: [{"type":"text", "text":messages.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)
+        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
         .then(response => {
           let data = response.data.FunctionResponse;
-          console.log("data", data);
-          if (data.choices && data.choices.length && data.choices[0].message) {
+          // console.log("data", data);
+          if (data.message) {
             let dArray = {};
             try {
               dArray = JSON.parse(
-                data.choices[0].message.content
+                data.message
                   .replaceAll("```json", "")
                   .replaceAll("```", "")
               );
@@ -291,7 +270,7 @@ export default {
               try {
                 let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
 
-                let match = data.choices[0].message.content.match(regex);
+                let match = data.message.match(regex);
                 dArray = JSON.parse(
                   match[0]
                     .replace(/\n/g, "")
@@ -301,7 +280,7 @@ export default {
               } catch (error) {
                 try {
                   dArray = JSON.parse(
-                    data.choices[0].message.content
+                    data.message
                       .replaceAll("```json", "")
                       .replaceAll("# Solution", "")
                       .replaceAll("```", "")
@@ -397,39 +376,28 @@ export default {
       let _this = this;
 
       let params = {
-        // "model": "Chat",
-        model: "gpt-4o",
-        temperature: 0,
-        max_tokens: 4096,
-        top_p: 1,
-        frequency_penalty: 0,
-        presence_penalty: 0,
-        messages: [
-          {
-            content: messages.replaceAll("\n", " ").replaceAll("*", ""),
-            role: "user"
-          }
-        ],
-        stream: false,
-        uid: this.userid,
-        mind_map_question: ""
+      
+        assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
+        message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
+        session_name: uuidv4(),
+        userId: this.userid,
+        file_ids: [],
+        model:'gpt-4o-2024-08-06'
       };
       return new Promise(resolve => {
         this.ajax
-          .post("https://gpt4.cocorobo.cn/chat", params)
+          .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
           .then(response => {
             let data = response.data.FunctionResponse;
             // console.log(data);
 
             if (
-              data.choices &&
-              data.choices.length &&
-              data.choices[0].message
+              data.message
             ) {
               let dArray = {};
               try {
                 dArray = JSON.parse(
-                  data.choices[0].message.content
+                  data.message
                     .replaceAll("```json", "")
                     .replaceAll("```", "")
                 );
@@ -438,7 +406,7 @@ export default {
                 try {
                   let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
 
-                  let match = data.choices[0].message.content.match(regex);
+                  let match = data.message.match(regex);
                   // console.log("dArray2", match);
                   dArray = JSON.parse(
                     match[0]
@@ -450,7 +418,7 @@ export default {
                 } catch (error) {
                   try {
                     dArray = JSON.parse(
-                      data.choices[0].message.content
+                      data.message
                         .replaceAll("```json", "")
                         .replaceAll("# Solution", "")
                         .replaceAll("```", "")

+ 19 - 22
src/components/easy2/studyStudent.vue

@@ -12037,6 +12037,7 @@ import scoreItem from '../scoreList/scoreItem.vue'
 import scoreZong from '../scoreZong/index.vue'
 import classRoomHelper from '../classRoomHelper/index.vue'
 import markScore from "./commpont/markScore";
+import { v4 as uuidv4 } from "uuid";
 
 const getFile = (url) => {
   return new Promise((resolve, reject) => {
@@ -12604,8 +12605,9 @@ export default {
         })
     },
     againEva(i,k){
+
       let msg = `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.
@@ -12620,40 +12622,35 @@ export default {
         维度描述:${this.chapInfoList[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: msg.replaceAll("\n", " ").replaceAll("*", ""),
-            role: "user"
-          }
-        ],
-        stream: false,
-        uid: this.userid,
-        mind_map_question: ""
+        assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
+        message: [{"type":"text", "text":msg.replaceAll('\n', " ").replaceAll('*', "")}],
+        session_name: uuidv4(),
+        userId: this.userid,
+        file_ids: [],
+        model:'gpt-4o-2024-08-06'
       };
+      console.log('params',params);
+      
       
         this.ajax
-          .post("https://gpt4.cocorobo.cn/chat", params)
+          .post("https://gpt4.cocorobo.cn/ai_agent_park_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;
+            if (data.message) {
+              let content = data.message;
               
               var regex = new RegExp('==([^=]+)==');
               let match = content.match(regex);

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