|
@@ -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);
|