How do I build an Amazon Lex Bot using the rest API?

让人想犯罪 __ 提交于 2019-12-11 03:21:43

问题


According to http://docs.aws.amazon.com/lex/latest/dg/API_Operations_Amazon_Lex_Model_Building_Service.html you can create or update bots and intents/slots (Put{Bot|Intend|Slot}, Create{Bot|Intend|Slot}Version).

So by using Put* I can configure a bot and with Create*Version I can publish one, but in order to publish it, first you need to build it and I can't find an API method for that.


回答1:


When using PutBot you can supply the --process-behavior flag with value BUILD to force a build.

From the documentation:

If you set the processBehavior element to Build, Amazon Lex builds the bot so that it can be run. If you set the element to Save Amazon Lex saves the bot, but doesn't build it. If you don't specify this value, the default value is Save.




回答2:


You can add below line in your json file if you are using CLI:

"processBehavior": "BUILD",

It will build the bot.



来源:https://stackoverflow.com/questions/44441662/how-do-i-build-an-amazon-lex-bot-using-the-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!