0.0.5 • Published 5 years ago

generator-convo v0.0.5

Weekly downloads
10
License
MIT
Repository
-
Last release
5 years ago

Build Status Dependencies Status Coverage Status Published Version npm Badge

Convo Generator

Convo Generator is a Convo agent and middleware generator using Yeoman.

This generator reads the environment configuration, Convo specification, and OpenAPI specification, which would then be used to generate:

Please have a look at Convo Thomas, Convo Hacker News, and Convo Jenkins as examples of how Convo Generator can be used.

Installation

Install Yeoman, Serverless, dialogflow-cli:

npm install -g yo serverless dialogflow-cli

Install Convo Generator itself:

npm install -g convo-generator

Configuration

Create the following mandatory configuration files:

And depending on the middleware type specified in your Convo specification, you need to provide these additional configuration files:

Middleware TypeConfiguration File
OpenAPI-CloudFunctionsOpenAPI specification

Usage

DialogFlow agent

Generate DialogFlow agent:

yo convo dialogflow-agent <path/to/env-config.yaml> <path/to/convo-spec.yaml>

Deploy the generated agent:

dialogflow-cli import --credentials <path/to/project-credentials.json> <path/to/generated-agent-dir/>

Alternatively, you can zip up the generated agent, and then import or restore the zip file to Dialogflow.

Freestyle-CloudFunctions middleware:

Generate Freestyle-CloudFunctions middleware:

yo convo freestyle-cloudfunctions-middleware <path/to/env-config.yaml> <path/to/convo-spec.yaml>

Deploy the generated middleware:

serverless deploy

OpenAPI-CloudFunctions middleware:

Generate OpenAPI-CloudFunctions middleware:

yo convo openapi-cloudfunctions-middleware <path/to/env-config.yaml> <path/to/convo-spec.yaml> <path/to/openapi-spec.yaml>

Deploy the generated middleware:

serverless deploy

Colophon

Related Projects:

  • Convo - Specification-based voice and text conversation library
  • convo-node - node.js utility module for Convo library
  • Convo Thomas - Convo agent for Thomas the Tank Engine Facts
  • Convo Hacker News - Convo agent and middleware for Hacker News
  • Convo Jenkins - Convo agent and middleware for Jenkins