mirror of
https://github.com/danbulant/Shasha
synced 2026-07-08 04:21:06 +00:00
chat2
This commit is contained in:
parent
3493bc88a9
commit
6782fd30fa
2 changed files with 7 additions and 7 deletions
|
|
@ -24,7 +24,7 @@ const URL = [
|
||||||
async function chatAnswer(message) {
|
async function chatAnswer(message) {
|
||||||
// return axios.post("https://rebot.me/ask", { username: "simsimi", question: message }).then(r => r.data).catch(() => { });
|
// return axios.post("https://rebot.me/ask", { username: "simsimi", question: message }).then(r => r.data).catch(() => { });
|
||||||
console.log(message);
|
console.log(message);
|
||||||
return axios.get(`https://api.simsimi.net/v1/?text=${message.replace(/( |\n|\t)+/, "+")}&lang=en&key=API-TEST-WEB`).then(r => {
|
return axios.get(`https://api.simsimi.net/v1/?text=${message.replace(/( |\n|\t)+/, "+").slice(0, 1000).replace(/Sim doesn't know what you are talking about. Please teach me/, "Sorry but i don't speak gibberish")}&lang=en`).then(r => {
|
||||||
console.log(r.data);
|
console.log(r.data);
|
||||||
return r.data.success;
|
return r.data.success;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue