Test version of api.ai Google Action while I have a live version?

喜夏-厌秋 提交于 2019-12-08 05:20:43

问题


How do I develop a new version of my Google Action in a separate test environment, while I already have a version that is live to users?

My Google Action uses api.ai, which has a Firebase Function for fulfilment.

Do I need to create a new api.ai agent that points to a different Firebase Function? Is there an easier way?


回答1:


Unfortunately, there really isn't an easy solution to this. There are a few problems with versioning with API.AI and Actions. The first is that some changes you make in API.AI may be reflected immediately in the system, but others won't, and it isn't entirely clear which is which. The second is that once you're ready to send it live and go through the approval process, some users will see your old version and some will see the new version for a period of time.

To handle this, I use this process once a version goes live:

  1. Create a new Firebase and API.AI project for the next version.

  2. Export the API.AI Zip file from the old project and import it into the new project. (While I'm at it, I put its contents into version control.)

  3. Change the Firebase deployment target to the new version.

  4. Change the API.AI fulfillment URL to the new URL.

You'll then develop and test your new version in this new environment. When you're ready to have it reviewed for release, specify this environment. Once it fully goes live and you get no traffic in your old environment, you can retire that one - you'll never re-use it.




回答2:


This is what I do :

I do not create separate api.ai agent, I have 2 servers, one is for production and one for testing. Whenever I make changes, I deploy it to my testing server and update my fulfillment to testing server url. And then I test those changes from Draft version.

I think in your case, you may want to create a new function and point your api.ai agent to new function. And do all testing there.

I am not sure if it's the best solution but it does what I want :)



来源:https://stackoverflow.com/questions/45872322/test-version-of-api-ai-google-action-while-i-have-a-live-version

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