Auto Commit

上级 71272aa3
...@@ -85,6 +85,15 @@ export default { ...@@ -85,6 +85,15 @@ export default {
* 发布到社区后,将消耗运行者的额度 * 发布到社区后,将消耗运行者的额度
* 注意:如果部署应用,任何人通过部署后的域名访问应用时,都将消耗部署者的额度 * 注意:如果部署应用,任何人通过部署后的域名访问应用时,都将消耗部署者的额度
*/ */
const body = {
messages: [
{
role: 'user',
content: question
}
],
apikey: apiKey
}
const source = fetchEventSource(apiUrl, { const source = fetchEventSource(apiUrl, {
method: 'POST', method: 'POST',
...@@ -116,25 +125,13 @@ export default { ...@@ -116,25 +125,13 @@ export default {
console.log("error", err); console.log("error", err);
} }
}); });
const body = { axios({
messages: [ method: "post",
{ url: "https://flask-wujiaping.inscode.cc/addhistory",
role: 'user', data: this.dialogs,
content: question }).then((res) => {
}
], });
apikey: apiKey
}
const data = {
dialogs:this.dialogs
}
fetch("https://flask-wujiaping.inscode.cc/addhistory", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
}).then((res) => console.log(res.data) )
}, },
handleNewChat() { handleNewChat() {
this.dialogs = []; this.dialogs = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册