Created
September 17, 2020 17:48
-
-
Save xitij2000/be21672222ce62070777e0368a39dc59 to your computer and use it in GitHub Desktop.
Sample Code for XBlock Chat's YAML configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- welcome-step: | |
messages: | |
- alice: "Hello my name is Alice!" | |
- bob: "And I am Bob." | |
- alice: "Today we will ask you a basic trivia question." | |
- bob: "Would you like to continue?" | |
responses: | |
- "Yes": question-step | |
- "No": exit-step | |
- question-step: | |
messages: | |
- alice: "Which is the highest mountain in the world." | |
responses: | |
- "Mount Everest": correct-step | |
- K2: incorrect-step | |
- "Mount Kea": incorrect-step | |
- "Mariana Trench": incorrect-step | |
- correct-step: | |
notice-text: "Correct answer" | |
notice-type: correct | |
messages: | |
- alice: "Well Done!" | |
responses: | |
- Yay: exit-step | |
- incorrect-step: | |
messages: | |
- bob: Sorry, but that's the wrong answer. | |
- alice: The correct answer is "Mount Everest". | |
- bob: K2 is actually the second tallest mountain. | |
- alice: Mount Kea extends underwater a lot, so by some measure it may be the tallest, but it isn't the highest. | |
- bob: And "Mariana Trench" is a trench. The deepest one, but pretty much the opposite of a mountain. | |
- alice: Would you like to try again? | |
responses: | |
- "Nah": exit-step | |
- "Why not? I know the answer now.": question-step | |
- exit-step: | |
messages: | |
- ["Bye for now!", "Good bye", "That's it for now"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment