|
@@ -2023,58 +2023,64 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
let history = [];
|
|
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();
|
|
// 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 = {
|
|
let params = {
|
|
assistant_id: this.choseRoleItem
|
|
assistant_id: this.choseRoleItem
|
|
? this.choseRoleItem.assistant_id
|
|
? this.choseRoleItem.assistant_id
|
|
: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
|
|
: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
|
|
userId: this.userid,
|
|
userId: this.userid,
|
|
- message: history,
|
|
|
|
|
|
+ message: _msg2,
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
uid: _uuid,
|
|
uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ // model: "gpt-4o-2024-08-06"
|
|
|
|
+ model:"gpt-4o-mini"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// model: "gpt-3.5-turbo",
|
|
// model: "gpt-3.5-turbo",
|
|
@@ -2244,7 +2250,7 @@ ${_atList
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
uid: _uuid,
|
|
uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// model: "gpt-3.5-turbo",
|
|
// model: "gpt-3.5-turbo",
|
|
@@ -2694,7 +2700,7 @@ Instruction: Based on the context, follow "Format example", write content
|
|
session_name: _uuid,
|
|
session_name: _uuid,
|
|
// uid: _uuid,
|
|
// uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// message: {
|
|
// message: {
|
|
@@ -2807,7 +2813,7 @@ Instruction: Based on the context, follow "Format example", write content
|
|
session_name: _uuid,
|
|
session_name: _uuid,
|
|
// uid: _uuid,
|
|
// uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// message: {
|
|
// message: {
|
|
@@ -3062,7 +3068,7 @@ ${_wordData}
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
uid: _uuid,
|
|
uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// model: "gpt-3.5-turbo",
|
|
// model: "gpt-3.5-turbo",
|
|
@@ -3259,7 +3265,7 @@ ${_wordData}
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
session_name: `${this.courseId}-studyStudent-md`,
|
|
uid: _uuid,
|
|
uid: _uuid,
|
|
file_ids: this.fileId,
|
|
file_ids: this.fileId,
|
|
- model: "gpt-4o-mini"
|
|
|
|
|
|
+ model: "gpt-4o-2024-08-06"
|
|
};
|
|
};
|
|
// let params = {
|
|
// let params = {
|
|
// model: "gpt-3.5-turbo",
|
|
// model: "gpt-3.5-turbo",
|