/**
* QQ : 1433668136
* 接 手机,模拟器,云手机 脚本定制
*
* @param {*} text 对话消息
* @param {*} apikey 图灵机器人秘钥
* @returns
*/
function turing(text, apikey) {
http.__okhttp__.setTimeout(10*1000);
try {
let res = http.postJson("http://openapi.tuling123.com/openapi/api/v2", {
"reqType": 0,
"perception": {
"inputText": {
"text": text,
},
},
"userInfo": {
"apiKey": apikey,
"userId": ""
}
}).body.json();
log(res);
let result = res['results'][0]['values']['text'];
return result;
} catch (e) {
return false;
}
}