SanHQin 4 months ago
parent
commit
d685c8449d
1 changed files with 53 additions and 47 deletions
  1. 53 47
      src/components/classRoomHelper/component/searchArea.vue

+ 53 - 47
src/components/classRoomHelper/component/searchArea.vue

@@ -2023,58 +2023,64 @@ export default {
         return;
       }
       let history = [];
-      this.nowChatList.forEach(i => {
-        if (i.content == "wanSearch") {
-          // history.push({
-          // 	role:"assistant",
-          // 	content: JSON.stringify(i.aiContent)
-          // })
-          return;
-        } else if (i.content == "getImage") {
-          // return history.push({
-          //   role: "user",
-          //   content: i.content
-          // });
-        } else if (i.content == "addAsk") {
-        }
-        if (i.content) {
-          history.push({
-            type: "text",
-            text: i.content
-          });
-        }
-        if (i.aiContent) {
-          history.push({
-            type: "text",
-            text: i.aiContent
-          });
-        }
-      });
+      // this.nowChatList.forEach(i => {
+      //   if (i.content == "wanSearch") {
+      //     // history.push({
+      //     // 	role:"assistant",
+      //     // 	content: JSON.stringify(i.aiContent)
+      //     // })
+      //     return;
+      //   } else if (i.content == "getImage") {
+      //     // return history.push({
+      //     //   role: "user",
+      //     //   content: i.content
+      //     // });
+      //   } else if (i.content == "addAsk") {
+      //   }
+      //   if (i.content) {
+      //     history.push({
+      //       type: "text",
+      //       text: i.content
+      //     });
+      //   }
+      //   if (i.aiContent) {
+      //     history.push({
+      //       type: "text",
+      //       text: i.aiContent
+      //     });
+      //   }
+      // });
       // history.pop();
-      if (_msg) {
-        history.push({ type: "text", text: _msg });
-      } else {
-        history.push({ type: "text", text: _text });
-      }
-
-			history = history.map(i=>({
-				type:i.type,
-				text:`Language: ${this.getLang()}
-				Language: ${this.getLang()}
-				Language: ${this.getLang()}
-			${i.text}`
-			}))
+      // if (_msg) {
+      //   history.push({ type: "text", text: _msg });
+      // } else {
+      //   history.push({ type: "text", text: _text });
+      // }
 
+			// history = history.map(i=>({
+			// 	type:i.type,
+			// 	text:`Language: ${this.getLang()}
+			// 	Language: ${this.getLang()}
+			// 	Language: ${this.getLang()}
+			// ${i.text}`
+			// }))
+			let _msg2 = `
+			Language: ${this.getLang()}
+			Language: ${this.getLang()}
+			Language: ${this.getLang()}
+			${_text}
+			`
       let params = {
         assistant_id: this.choseRoleItem
           ? this.choseRoleItem.assistant_id
           : "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
         userId: this.userid,
-        message: history,
+        message: _msg2,
         session_name: `${this.courseId}-studyStudent-md`,
         uid: _uuid,
         file_ids: this.fileId,
-        model: "gpt-4o-mini"
+        // model: "gpt-4o-2024-08-06"
+				model:"gpt-4o-mini"
       };
       // let params = {
       //   model: "gpt-3.5-turbo",
@@ -2244,7 +2250,7 @@ ${_atList
         session_name: `${this.courseId}-studyStudent-md`,
         uid: _uuid,
         file_ids: this.fileId,
-        model: "gpt-4o-mini"
+        model: "gpt-4o-2024-08-06"
       };
       // let params = {
       //   model: "gpt-3.5-turbo",
@@ -2694,7 +2700,7 @@ Instruction: Based on the context, follow "Format example", write content
         session_name: _uuid,
         // uid: _uuid,
         file_ids: this.fileId,
-        model: "gpt-4o-mini"
+        model: "gpt-4o-2024-08-06"
       };
       // let params = {
       //   message: {
@@ -2807,7 +2813,7 @@ Instruction: Based on the context, follow "Format example", write content
         session_name: _uuid,
         // uid: _uuid,
         file_ids: this.fileId,
-        model: "gpt-4o-mini"
+        model: "gpt-4o-2024-08-06"
       };
       // let params = {
       //   message: {
@@ -3062,7 +3068,7 @@ ${_wordData}
             session_name: `${this.courseId}-studyStudent-md`,
             uid: _uuid,
             file_ids: this.fileId,
-            model: "gpt-4o-mini"
+            model: "gpt-4o-2024-08-06"
           };
           // let params = {
           //   model: "gpt-3.5-turbo",
@@ -3259,7 +3265,7 @@ ${_wordData}
         session_name: `${this.courseId}-studyStudent-md`,
         uid: _uuid,
         file_ids: this.fileId,
-        model: "gpt-4o-mini"
+        model: "gpt-4o-2024-08-06"
       };
       // let params = {
       //     model: "gpt-3.5-turbo",