summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2023-12-30 14:58:00 +0100
committermayx <mayx@outlook.com>2023-12-30 14:58:00 +0100
commitc622346eaa8b6891571ae60f91965b722cf14df3 (patch)
treeaed1bfbf1582e9fa015afbb53bedbf58b38005df
parent7609bb0b8f4c7b244278ffe30490cfe4ba7c9dea (diff)
Update 2 files
- /Gemfile - /Live2dHistoire/live2d/js/message.js
-rw-r--r--Gemfile2
-rw-r--r--Live2dHistoire/live2d/js/message.js17
2 files changed, 13 insertions, 6 deletions
diff --git a/Gemfile b/Gemfile
index 6547c92..44e0d9c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
source "https://rubygems.org"
-gem "jekyll", "~> 4.1.0"
+gem "jekyll"
group :jekyll_plugins do
gem "jekyll-gist"
gem "jekyll-coffeescript"
diff --git a/Live2dHistoire/live2d/js/message.js b/Live2dHistoire/live2d/js/message.js
index 90a5e88..d79a293 100644
--- a/Live2dHistoire/live2d/js/message.js
+++ b/Live2dHistoire/live2d/js/message.js
@@ -289,17 +289,24 @@ if(!norunFlag){
type: 'POST',
url: "https://www.tuling123.com/openapi/api",
data: {
- "key": "ae8933884bcc4bac96289a43d8a864db",
- "info":info_,
- "userid":userid_
+ "reqType":0,
+ "perception": {
+ "inputText": {
+ "text": info_
+ }
+ },
+ "userInfo": {
+ "apiKey": "ae8933884bcc4bac96289a43d8a864db",
+ "userId": userid_
+ }
},
success: function(res) {
- if(res.code !== 100000){
+ if(res.intent.code !== 0){
talkValTimer();
showMessage('似乎有什么错误,请和站长联系!',0);
}else{
talkValTimer();
- showMessage(res.text,0);
+ showMessage(res.results[0].values.text,0);
}
console.log(res);
$('#AIuserText').val("");