答案 0 :(得分:2)
Google目前没有官方执行库。可能有一个由社区成员维护。
如果您想使用Python,您也可以使用JSON消息进行响应。 documentation for Actions on Google有一个标签,描述了您需要发送的直接JSON响应。
这样,Node.js代码
conv.ask(new SimpleResponse({
speech: 'Howdy! I can tell you fun facts about almost any number, like 42. What do you have in mind?',
text: 'Howdy! I can tell you fun facts about almost any number, like 42. What do you have in mind?',
}));
相当于
{
"conversationToken": "",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Howdy! I can tell you fun facts about almost any number, like 42. What do you have in mind?",
"displayText": "Howdy! I can tell you fun facts about almost any number. What do you have in mind?"
}
}
],
"suggestions": []
}
},
"possibleIntents": [
{
"intent": "actions.intent.TEXT"
}
]
}
]}