|
@@ -12897,79 +12897,42 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
},
|
|
|
aiGet2(messages, callback) {
|
|
|
let _this = this
|
|
|
- // let params = JSON.stringify({
|
|
|
- // // "model": "Chat",
|
|
|
- // model: 'gpt-3.5-turbo',
|
|
|
- // temperature: 0,
|
|
|
- // max_tokens: 4096,
|
|
|
- // top_p: 1,
|
|
|
- // frequency_penalty: 0,
|
|
|
- // presence_penalty: 0,
|
|
|
- // messages: [{
|
|
|
- // content: messages,
|
|
|
- // role: 'user'
|
|
|
- // }],
|
|
|
- // stream: false,
|
|
|
- // uid: this.userid,
|
|
|
- // mind_map_question: "",
|
|
|
- // })
|
|
|
let params = JSON.stringify({
|
|
|
- message: {
|
|
|
- anthropic_version: "bedrock-2023-05-31",
|
|
|
- max_tokens: 4096,
|
|
|
- temperature: 0,
|
|
|
- top_p: 1,
|
|
|
- messages: [{
|
|
|
- content: messages,
|
|
|
- role: 'user'
|
|
|
- }], //
|
|
|
- },
|
|
|
- model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
- });
|
|
|
- // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
- _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
+ // "model": "Chat",
|
|
|
+ model: 'gpt-3.5-turbo',
|
|
|
+ temperature: 0,
|
|
|
+ max_tokens: 4096,
|
|
|
+ top_p: 1,
|
|
|
+ frequency_penalty: 0,
|
|
|
+ presence_penalty: 0,
|
|
|
+ messages: [{
|
|
|
+ content: messages,
|
|
|
+ role: 'user'
|
|
|
+ }],
|
|
|
+ stream: false,
|
|
|
+ uid: this.userid,
|
|
|
+ mind_map_question: "",
|
|
|
+ })
|
|
|
+ // let params = JSON.stringify({
|
|
|
+ // message: {
|
|
|
+ // anthropic_version: "bedrock-2023-05-31",
|
|
|
+ // max_tokens: 4096,
|
|
|
+ // temperature: 0,
|
|
|
+ // top_p: 1,
|
|
|
+ // messages: [{
|
|
|
+ // content: messages,
|
|
|
+ // role: 'user'
|
|
|
+ // }], //
|
|
|
+ // },
|
|
|
+ // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
+ // });
|
|
|
+ _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
+ // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
console.log(response);
|
|
|
let data = response.data.FunctionResponse
|
|
|
- // if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- // console.log(data.choices[0].message.content);
|
|
|
- // let dArray = JSON.parse(data.choices[0].message.content)
|
|
|
- // _this.dArray = dArray
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
-
|
|
|
- // for (var i = 0; i < dArray.length; i++) {
|
|
|
- // let _task = dArray[i]
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
- // task: _task.task,
|
|
|
- // taskDetail: "",
|
|
|
- // taskDetail2: _task.detail,
|
|
|
- // taskDetail3: "",
|
|
|
- // chapterData: [],
|
|
|
- // toolText: "",
|
|
|
- // toolChoose: [
|
|
|
- // {
|
|
|
- // tool: [],
|
|
|
- // toolDetail: "",
|
|
|
- // toolType: 0,
|
|
|
- // askCount: 1,
|
|
|
- // askTitle: "",
|
|
|
- // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- // },
|
|
|
- // ],
|
|
|
- // isShowTools: false,
|
|
|
- // askCount: 1,
|
|
|
- // isFold: 1,
|
|
|
- // askTitle: "",
|
|
|
- // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- // checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
- // homeworkList: [],
|
|
|
- // })
|
|
|
- // }
|
|
|
- // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
- // _this.$forceUpdate();
|
|
|
- // }
|
|
|
- if (data.result) {
|
|
|
- console.log(data.result);
|
|
|
- let dArray = JSON.parse(data.result)
|
|
|
+ if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
+ console.log(data.choices[0].message.content);
|
|
|
+ let dArray = JSON.parse(data.choices[0].message.content)
|
|
|
_this.dArray = dArray
|
|
|
_this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
|
|
@@ -13004,79 +12967,22 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
_this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
_this.$forceUpdate();
|
|
|
}
|
|
|
- callback ? callback() : ''
|
|
|
- }).catch(function (error) {
|
|
|
- _this.loading = false
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
- aiGet3(messages, callback) {
|
|
|
- let _this = this
|
|
|
- // let params = JSON.stringify({
|
|
|
- // // "model": "Chat",
|
|
|
- // model: 'gpt-3.5-turbo',
|
|
|
- // temperature: 0,
|
|
|
- // max_tokens: 4096,
|
|
|
- // top_p: 1,
|
|
|
- // frequency_penalty: 0,
|
|
|
- // presence_penalty: 0,
|
|
|
- // messages: [{
|
|
|
- // content: messages,
|
|
|
- // role: 'user'
|
|
|
- // }],
|
|
|
- // stream: false,
|
|
|
- // uid: this.userid,
|
|
|
- // mind_map_question: "",
|
|
|
- // })
|
|
|
- let params = JSON.stringify({
|
|
|
- message: {
|
|
|
- anthropic_version: "bedrock-2023-05-31",
|
|
|
- max_tokens: 4096,
|
|
|
- temperature: 0,
|
|
|
- top_p: 1,
|
|
|
- messages: [{
|
|
|
- content: messages,
|
|
|
- role: 'user'
|
|
|
- }], //
|
|
|
- },
|
|
|
- model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
- });
|
|
|
- // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
- _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
- console.log(response);
|
|
|
- let data = response.data.FunctionResponse
|
|
|
- // if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- // console.log(data.choices[0].message.content);
|
|
|
- // let tArray = JSON.parse(data.choices[0].message.content)
|
|
|
- // // _this.unitJson[0].chapterInfo[0].task = []
|
|
|
+ // if (data.result) {
|
|
|
+ // console.log(data.result);
|
|
|
+ // let dArray = JSON.parse(data.result)
|
|
|
+ // _this.dArray = dArray
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
|
|
|
- // let toolsJson = {
|
|
|
- // "电子白板": { tool: 1, type: 1 },
|
|
|
- // "文档": { tool: 52, type: 1 },
|
|
|
- // "思维导图": { tool: 3, type: 1 },
|
|
|
- // "表格": { tool: 48, type: 1 },
|
|
|
- // "作业提交": { tool: 16, type: 2 }
|
|
|
- // }
|
|
|
- // for (var i = 0; i < tArray.length; i++) {
|
|
|
- // let _task = tArray[i]
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
|
|
|
- // if (_task.toolChoose.length) {
|
|
|
- // for (var j = 0; j < _task.toolChoose.length; j++) {
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
|
|
|
- // {
|
|
|
- // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
|
|
|
- // toolDetail: _task.toolChoose[j].detail,
|
|
|
- // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
|
|
|
- // askCount: 1,
|
|
|
- // askTitle: "",
|
|
|
- // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- // },
|
|
|
- // )
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
|
|
|
+ // for (var i = 0; i < dArray.length; i++) {
|
|
|
+ // let _task = dArray[i]
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
+ // task: _task.task,
|
|
|
+ // taskDetail: "",
|
|
|
+ // taskDetail2: _task.detail,
|
|
|
+ // taskDetail3: "",
|
|
|
+ // chapterData: [],
|
|
|
+ // toolText: "",
|
|
|
+ // toolChoose: [
|
|
|
// {
|
|
|
// tool: [],
|
|
|
// toolDetail: "",
|
|
@@ -13085,15 +12991,63 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
// askTitle: "",
|
|
|
// askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
// },
|
|
|
- // )
|
|
|
- // }
|
|
|
+ // ],
|
|
|
+ // isShowTools: false,
|
|
|
+ // askCount: 1,
|
|
|
+ // isFold: 1,
|
|
|
+ // askTitle: "",
|
|
|
+ // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ // checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
+ // homeworkList: [],
|
|
|
+ // })
|
|
|
// }
|
|
|
// _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
// _this.$forceUpdate();
|
|
|
// }
|
|
|
- if (data.result) {
|
|
|
- console.log(data.result);
|
|
|
- let tArray = JSON.parse(data.result)
|
|
|
+ callback ? callback() : ''
|
|
|
+ }).catch(function (error) {
|
|
|
+ _this.loading = false
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ aiGet3(messages, callback) {
|
|
|
+ let _this = this
|
|
|
+ let params = JSON.stringify({
|
|
|
+ // "model": "Chat",
|
|
|
+ model: 'gpt-3.5-turbo',
|
|
|
+ temperature: 0,
|
|
|
+ max_tokens: 4096,
|
|
|
+ top_p: 1,
|
|
|
+ frequency_penalty: 0,
|
|
|
+ presence_penalty: 0,
|
|
|
+ messages: [{
|
|
|
+ content: messages,
|
|
|
+ role: 'user'
|
|
|
+ }],
|
|
|
+ stream: false,
|
|
|
+ uid: this.userid,
|
|
|
+ mind_map_question: "",
|
|
|
+ })
|
|
|
+ // let params = JSON.stringify({
|
|
|
+ // message: {
|
|
|
+ // anthropic_version: "bedrock-2023-05-31",
|
|
|
+ // max_tokens: 4096,
|
|
|
+ // temperature: 0,
|
|
|
+ // top_p: 1,
|
|
|
+ // messages: [{
|
|
|
+ // content: messages,
|
|
|
+ // role: 'user'
|
|
|
+ // }], //
|
|
|
+ // },
|
|
|
+ // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
+ // });
|
|
|
+ _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
+ // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
+ console.log(response);
|
|
|
+ let data = response.data.FunctionResponse
|
|
|
+ if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
+ console.log(data.choices[0].message.content);
|
|
|
+ let tArray = JSON.parse(data.choices[0].message.content)
|
|
|
// _this.unitJson[0].chapterInfo[0].task = []
|
|
|
|
|
|
let toolsJson = {
|
|
@@ -13137,6 +13091,52 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
_this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
_this.$forceUpdate();
|
|
|
}
|
|
|
+ // if (data.result) {
|
|
|
+ // console.log(data.result);
|
|
|
+ // let tArray = JSON.parse(data.result)
|
|
|
+ // // _this.unitJson[0].chapterInfo[0].task = []
|
|
|
+
|
|
|
+ // let toolsJson = {
|
|
|
+ // "电子白板": { tool: 1, type: 1 },
|
|
|
+ // "文档": { tool: 52, type: 1 },
|
|
|
+ // "思维导图": { tool: 3, type: 1 },
|
|
|
+ // "表格": { tool: 48, type: 1 },
|
|
|
+ // "作业提交": { tool: 16, type: 2 }
|
|
|
+ // }
|
|
|
+ // for (var i = 0; i < tArray.length; i++) {
|
|
|
+ // let _task = tArray[i]
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
|
|
|
+ // if (_task.toolChoose.length) {
|
|
|
+ // for (var j = 0; j < _task.toolChoose.length; j++) {
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
|
|
|
+ // {
|
|
|
+ // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
|
|
|
+ // toolDetail: _task.toolChoose[j].detail,
|
|
|
+ // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
|
|
|
+ // askCount: 1,
|
|
|
+ // askTitle: "",
|
|
|
+ // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ // },
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
|
|
|
+ // {
|
|
|
+ // tool: [],
|
|
|
+ // toolDetail: "",
|
|
|
+ // toolType: 0,
|
|
|
+ // askCount: 1,
|
|
|
+ // askTitle: "",
|
|
|
+ // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ // },
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
+ // _this.$forceUpdate();
|
|
|
+ // }
|
|
|
callback ? callback() : ''
|
|
|
}).catch(function (error) {
|
|
|
_this.loading = false
|
|
@@ -13145,55 +13145,43 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
},
|
|
|
aiGet4(messages, callback, clickType) {
|
|
|
let _this = this
|
|
|
- // let params = JSON.stringify({
|
|
|
- // // "model": "Chat",
|
|
|
- // model: 'gpt-3.5-turbo',
|
|
|
- // temperature: 0,
|
|
|
- // max_tokens: 4096,
|
|
|
- // top_p: 1,
|
|
|
- // frequency_penalty: 0,
|
|
|
- // presence_penalty: 0,
|
|
|
- // messages: [{
|
|
|
- // content: messages,
|
|
|
- // role: 'user'
|
|
|
- // }],
|
|
|
- // stream: false,
|
|
|
- // uid: this.userid,
|
|
|
- // mind_map_question: "",
|
|
|
- // })
|
|
|
let params = JSON.stringify({
|
|
|
- message: {
|
|
|
- anthropic_version: "bedrock-2023-05-31",
|
|
|
- max_tokens: 4096,
|
|
|
- temperature: 0,
|
|
|
- top_p: 1,
|
|
|
- messages: [{
|
|
|
- content: messages,
|
|
|
- role: 'user'
|
|
|
- }], //
|
|
|
- },
|
|
|
- model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
- });
|
|
|
- // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
- _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
+ // "model": "Chat",
|
|
|
+ model: 'gpt-3.5-turbo',
|
|
|
+ temperature: 0,
|
|
|
+ max_tokens: 4096,
|
|
|
+ top_p: 1,
|
|
|
+ frequency_penalty: 0,
|
|
|
+ presence_penalty: 0,
|
|
|
+ messages: [{
|
|
|
+ content: messages,
|
|
|
+ role: 'user'
|
|
|
+ }],
|
|
|
+ stream: false,
|
|
|
+ uid: this.userid,
|
|
|
+ mind_map_question: "",
|
|
|
+ })
|
|
|
+ // let params = JSON.stringify({
|
|
|
+ // message: {
|
|
|
+ // anthropic_version: "bedrock-2023-05-31",
|
|
|
+ // max_tokens: 4096,
|
|
|
+ // temperature: 0,
|
|
|
+ // top_p: 1,
|
|
|
+ // messages: [{
|
|
|
+ // content: messages,
|
|
|
+ // role: 'user'
|
|
|
+ // }], //
|
|
|
+ // },
|
|
|
+ // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
+ // });
|
|
|
+ _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
+ // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
console.log(response);
|
|
|
let data = response.data.FunctionResponse
|
|
|
- // if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- // console.log(data.choices[0].message.content);
|
|
|
- // let dArray = JSON.parse(data.choices[0].message.content)
|
|
|
- // _this.teacherText = JSON.parse(data.choices[0].message.content)
|
|
|
-
|
|
|
- // for (var i = 0; i < dArray.length; i++) {
|
|
|
- // let _task = dArray[i]
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
|
|
|
- // }
|
|
|
- // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
- // _this.$forceUpdate();
|
|
|
- // }
|
|
|
- if (data.result) {
|
|
|
- console.log(data.result);
|
|
|
- let dArray = JSON.parse(data.result)
|
|
|
- _this.teacherText = JSON.parse(data.result)
|
|
|
+ if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
+ console.log(data.choices[0].message.content);
|
|
|
+ let dArray = JSON.parse(data.choices[0].message.content)
|
|
|
+ _this.teacherText = JSON.parse(data.choices[0].message.content)
|
|
|
|
|
|
for (var i = 0; i < dArray.length; i++) {
|
|
|
let _task = dArray[i]
|
|
@@ -13202,6 +13190,18 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
_this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
_this.$forceUpdate();
|
|
|
}
|
|
|
+ // if (data.result) {
|
|
|
+ // console.log(data.result);
|
|
|
+ // let dArray = JSON.parse(data.result)
|
|
|
+ // _this.teacherText = JSON.parse(data.result)
|
|
|
+
|
|
|
+ // for (var i = 0; i < dArray.length; i++) {
|
|
|
+ // let _task = dArray[i]
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
|
|
|
+ // }
|
|
|
+ // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
|
+ // _this.$forceUpdate();
|
|
|
+ // }
|
|
|
callback ? callback() : ''
|
|
|
_this.loading = false
|
|
|
}).catch(function (error) {
|
|
@@ -13577,49 +13577,49 @@ ${msg} 输出格式和内容要求参考# 格式与要求
|
|
|
{"value":"评价维度3","detail":"维度描述3","score":5}
|
|
|
]`
|
|
|
_this.taskDetailLoading4.push(_tindex)
|
|
|
- // let params = JSON.stringify({
|
|
|
- // // "model": "Chat",
|
|
|
- // model: 'gpt-3.5-turbo',
|
|
|
- // temperature: 0,
|
|
|
- // max_tokens: 4096,
|
|
|
- // top_p: 1,
|
|
|
- // frequency_penalty: 0,
|
|
|
- // presence_penalty: 0,
|
|
|
- // messages: [{
|
|
|
- // content: messages,
|
|
|
- // role: 'user'
|
|
|
- // }],
|
|
|
- // stream: false,
|
|
|
- // uid: this.userid,
|
|
|
- // mind_map_question: "",
|
|
|
- // })
|
|
|
let params = JSON.stringify({
|
|
|
- message: {
|
|
|
- anthropic_version: "bedrock-2023-05-31",
|
|
|
- max_tokens: 4096,
|
|
|
- temperature: 0,
|
|
|
- top_p: 1,
|
|
|
- messages: [{
|
|
|
- content: messages,
|
|
|
- role: 'user'
|
|
|
- }], //
|
|
|
- },
|
|
|
- model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
- });
|
|
|
- // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
- _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
+ // "model": "Chat",
|
|
|
+ model: 'gpt-3.5-turbo',
|
|
|
+ temperature: 0,
|
|
|
+ max_tokens: 4096,
|
|
|
+ top_p: 1,
|
|
|
+ frequency_penalty: 0,
|
|
|
+ presence_penalty: 0,
|
|
|
+ messages: [{
|
|
|
+ content: messages,
|
|
|
+ role: 'user'
|
|
|
+ }],
|
|
|
+ stream: false,
|
|
|
+ uid: this.userid,
|
|
|
+ mind_map_question: "",
|
|
|
+ })
|
|
|
+ // let params = JSON.stringify({
|
|
|
+ // message: {
|
|
|
+ // anthropic_version: "bedrock-2023-05-31",
|
|
|
+ // max_tokens: 4096,
|
|
|
+ // temperature: 0,
|
|
|
+ // top_p: 1,
|
|
|
+ // messages: [{
|
|
|
+ // content: messages,
|
|
|
+ // role: 'user'
|
|
|
+ // }], //
|
|
|
+ // },
|
|
|
+ // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
|
|
|
+ // });
|
|
|
+ _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
|
|
|
+ // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
|
|
|
console.log(response);
|
|
|
let data = response.data.FunctionResponse
|
|
|
- // if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
- // console.log(data.choices[0].message.content);
|
|
|
- // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
|
|
|
- // _this.$forceUpdate()
|
|
|
- // }
|
|
|
- if (data.result) {
|
|
|
- console.log(data.result);
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
|
|
|
+ if (data.choices && data.choices.length && data.choices[0].message) {
|
|
|
+ console.log(data.choices[0].message.content);
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
|
|
|
_this.$forceUpdate()
|
|
|
}
|
|
|
+ // if (data.result) {
|
|
|
+ // console.log(data.result);
|
|
|
+ // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
|
|
|
+ // _this.$forceUpdate()
|
|
|
+ // }
|
|
|
_this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
|
|
|
}).catch(function (error) {
|
|
|
_this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
|