Skip to content

Instantly share code, notes, and snippets.

@andreafalzetti
Created December 14, 2016 22:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreafalzetti/012362c8d172dac1871b41115aa10a6c to your computer and use it in GitHub Desktop.
Save andreafalzetti/012362c8d172dac1871b41115aa10a6c to your computer and use it in GitHub Desktop.
Proof of concept for a YAML script for a Chat Bot
0:
messages:
- Hello!
- I'm a Bot!
next: 1
1:
messages:
- "What's your name?"
input:
type: text
key: user_name
when:
empty:
messages:
- "The name is empty!"
- "Let's try again.."
next: 1
not-empty:
next: 2
2:
messages:
- "Nice to meet you, ${user_name}"
next: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment