qgt 2 ماه پیش
والد
کامیت
a3a0f7491a
2فایلهای تغییر یافته به همراه36 افزوده شده و 13 حذف شده
  1. 1 1
      src/common/axios.config.js
  2. 35 12
      src/components/components/intelligentAnalysis/checkAi/aiLeader.vue

+ 1 - 1
src/common/axios.config.js

@@ -17,7 +17,7 @@ axios.interceptors.request.use((config) => {
     }
     }
     if (config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/imageAnalyse' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
     if (config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/imageAnalyse' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
         config.data = config.data //序列化post 参数
         config.data = config.data //序列化post 参数
-    }else if(config.url.indexOf('https://gpt4.cocorobo.cn/')!=-1 || config.url.indexOf('https://claude3.cocorobo.cn/')!=-1){
+    }else if(config.url.indexOf('https://gpt4.cocorobo.cn/')!=-1 || config.url.indexOf('https://claude3.cocorobo.cn/')!=-1 || config.url.indexOf('https://appapi.cocorobo.cn/')!=-1){
 			config.headers = {
 			config.headers = {
 				'Content-Type': 'application/json',
 				'Content-Type': 'application/json',
 		}
 		}

+ 35 - 12
src/components/components/intelligentAnalysis/checkAi/aiLeader.vue

@@ -640,15 +640,37 @@ ${JSON.stringify(fileData.data)}
 ${fileText}
 ${fileText}
 ## Format example
 ## Format example
 [{"index": 1,"title": "垃圾分类标准","label": "不同国家的垃圾分类标准和方法?"},{"index": 2,"title":"可回收垃圾处理","label": "可回收垃圾的处理流程和再利用方法?"},{  "index": 3,  "title": "有害垃圾的影响",  "label": "有害垃圾对环境和人体健康的潜在影响?"},{  "index": 4,  "title": "垃圾分类标准",  "label": "不同国家的垃圾分类标准和方法?"},{  "index": 5,  "title": "可回收垃圾处理",  "label": "可回收垃圾的处理流程和再利用方法?"},{  "index": 6,  "title": "有害垃圾的影响",  "label": "有害垃圾对环境和人体健康的潜在影响?"}]`;
 [{"index": 1,"title": "垃圾分类标准","label": "不同国家的垃圾分类标准和方法?"},{"index": 2,"title":"可回收垃圾处理","label": "可回收垃圾的处理流程和再利用方法?"},{  "index": 3,  "title": "有害垃圾的影响",  "label": "有害垃圾对环境和人体健康的潜在影响?"},{  "index": 4,  "title": "垃圾分类标准",  "label": "不同国家的垃圾分类标准和方法?"},{  "index": 5,  "title": "可回收垃圾处理",  "label": "可回收垃圾的处理流程和再利用方法?"},{  "index": 6,  "title": "有害垃圾的影响",  "label": "有害垃圾对环境和人体健康的潜在影响?"}]`;
-      let params = {
-        assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
-        userId: this.userid,
-        message: _msg,
-        session_name: _uid,
-        // uid: _uuid,
-        file_ids: this.fileId,
-        model: "gpt-4o-2024-08-06"
-      };
+      // let params = {
+      //   assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
+      //   userId: this.userid,
+      //   message: _msg,
+      //   session_name: _uid,
+      //   // uid: _uuid,
+      //   file_ids: this.fileId,
+      //   model: "gpt-4o-2024-08-06"
+      // };
+
+			let params = {
+				// assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
+        //     userId: this.userid,
+        //     message: _msg,
+        //     session_name: `${_uid}_session_name`,
+        //     uid: _uid,
+        //     file_ids: [],
+        //     model: "gpt-4o-2024-11-20"
+				id:"6063369f-289a-11ef-8bf4-12e77c4cb76b",
+				max_completion_tokens:4096,
+				message: _msg,
+				model: "gpt-4o-2024-11-20",
+				userId: this.userid,
+				sound_url:"",
+				file_ids:[],
+				temperature:0.2,
+				top_p:1,
+				stream:false,
+				session_name:uuidv4(),
+				uid:_uid,
+			}
       this.array.push({
       this.array.push({
         loading: false,
         loading: false,
         role: "user",
         role: "user",
@@ -668,10 +690,11 @@ ${fileText}
       this.ajax
       this.ajax
         // .post("https://gpt4.cocorobo.cn/chat", params)
         // .post("https://gpt4.cocorobo.cn/chat", params)
         // .post("https://claude3.cocorobo.cn/chat", params)
         // .post("https://claude3.cocorobo.cn/chat", params)
-        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
+        // .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
+        .post("https://appapi.cocorobo.cn/api/agentchats/ai_agent_chat", params)
         .then(res => {
         .then(res => {
-          // console.log(res);
-          let _data = res.data.FunctionResponse.message;
+          console.log("👉====",res);
+          let _data = res.data.message;
           _data = _data.replaceAll("```json", "").replaceAll("```", "");
           _data = _data.replaceAll("```json", "").replaceAll("```", "");
           const match = _data.match(/\[\s*{[^]*}\s*\]/);
           const match = _data.match(/\[\s*{[^]*}\s*\]/);
           // console.log("this.wangData",this.wangData);
           // console.log("this.wangData",this.wangData);