[英]Python Library for actions on google
There is currently no official fulfillment library for Actions on Google. 目前,Google尚没有正式的Actions履行库。 There might be one that is maintained by community members. 可能有一个由社区成员维护。
If you want to use Python, you could alternatively just respond using JSON messages. 如果要使用Python,则可以选择使用JSON消息进行响应。 The documentation for Actions on Google has a tab describing the direct JSON responses that you would need to send. Google上的Actions文档有一个标签,用于描述您需要发送的直接JSON响应。
In this way, the Node.js code 这样,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?',
}));
is equivalent to 相当于
{
"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"
}
]
}
]}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.