hongbo-miao/hongbomiao.com

View on GitHub
machine-learning/hm-rasa/domain.yml

Summary

Maintainability
Test Coverage
---
version: "3.1"

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

intents:
  - greet
  - goodbye
  - affirm
  - deny
  - mood_great
  - mood_unhappy
  - bot_challenge
  - get_current_time
  - set_my_favorite_color
  - get_my_favorite_color
  - buy_pizza
  - set_pizza_size
  - set_pizza_type
  - stop

entities:
  - my_favorite_color
  - pizza_size
  - pizza_type

slots:
  my_favorite_color:
    type: text
    influence_conversation: true
    mappings:
      - type: from_entity
        entity: my_favorite_color
  pizza_size:
    type: text
    influence_conversation: true
    mappings:
      - type: from_entity
        entity: pizza_size
  pizza_type:
    type: text
    influence_conversation: true
    mappings:
      - type: from_entity
        entity: pizza_type

responses:
  utter_greet:
    - text: Hey! How are you?
  utter_cheer_up:
    - text: "Here is something to cheer you up:"
      image: https://i.imgur.com/nGF1K8f.jpg
  utter_did_that_help:
    - text: Did that help you?
  utter_happy:
    - text: Great, carry on!
  utter_goodbye:
    - text: Bye!

  utter_iamabot:
    - text: Yes, I am a bot!

  utter_remember:
    - text: Thanks. I'll remember that.

  utter_order_pizza:
    - text: I will now order a {pizza_size} {pizza_type} pizza for you!
  utter_ask_continue:
    - text: Are you sure you want to stop the form?
  utter_ask_pizza_size:
    - text: What size would you like your pizza to be?
  utter_ask_pizza_type:
    - text: What kind of pizza would you like to buy?

actions:
  - action_get_current_time
  - action_get_my_favorite_color
  - validate_pizza_form

forms:
  pizza_form:
    required_slots:
      - pizza_size
      - pizza_type