CoCo dialog flow connector is a Flask application which allows you to expose your Dialogflow bots as a components at the CoCo marketplace.
- Create a bot on Dialogflow.
- Create 3 actions at your conversation flow:
- Done Action - Action which will be triggered when the bot/
component
achived it's goal(Default: input.complete). - Failed Action - Action which will be triggered when the bot/
component
will not complete it's goad(Default: input.failed). - Out Of Context - Action which will be triggered when the conversation went out of context(input.unknown).
- Done Action - Action which will be triggered when the bot/
- Create private key for bot/
component
service account in JSON format. - Place the key JSON at the following directory at the CoCo DialogFlow Connector source:
/DialogFlowManager/components
- Each file represent a component which can be accessed through an http call tohttps://<host>/api/exchange/<file name - no extension>/<session ID>
- Map the 3 actions that were created at the config or just use the default action names which are mentioned above.
- Upload the Flask app to a cloud service(Google app engine is recommende - yaml file included.)
Create a new agent.
At the example the created action will complete the component.
Map the bot actions to component states at the config.py file.
Open bash, configure gcloud tools and then run the following command:
`gcloud app deploy`