calpoly-csai / swanton

Swanton Pacific Ranch chatbot with a knowledge graph
MIT License
3 stars 1 forks source link

Update story_convert.py to support buttons #45

Closed Jason-Ku closed 3 years ago

Jason-Ku commented 3 years ago

Notes

Testing

Ran story_converter.py on a small test file with three stories and a button - see domain.yml output here:

intents:
  - Where_is_the_ranch
  - What_crops_are_grown_at_the_ranch
  - What_kind_of_livestock_is_raised_at_Swanton_Pacific_Ranch

actions:
  - utter_Swanton_Pacific_Ranch_is_in_Santa_Cruz_County
  - utter_Swanton_Pacific_Ranch_is_in_Santa_Cruz_County_button
  - utter_CLOSING
  - utter_Swanton_Pacific_Ranch_grows_apple_orchards_oat_hay_pumpkins_and_Christmas_trees
  - utter_Swanton_Pacific_raises_cattle

responses:
  utter_Swanton_Pacific_Ranch_is_in_Santa_Cruz_County:
  - text: "Swanton Pacific Ranch is in Santa Cruz County."

  utter_Swanton_Pacific_Ranch_is_in_Santa_Cruz_County_button:
  - text: "Would you like to know more about what lives at the Ranch?"
    buttons:
    - title: "What crops are grown at the ranch?"
      payload: /What_crops_are_grown_at_the_ranch
    - title: "What kind of livestock is raised at Swanton Pacific Ranch?"
      payload: /What_kind_of_livestock_is_raised_at_Swanton_Pacific_Ranch

  utter_CLOSING:
  - text: "Have a great day!"
  - text: "Good bye!"
  - text: "See you later."
  - text: "Enjoy your day."

  utter_Swanton_Pacific_Ranch_grows_apple_orchards_oat_hay_pumpkins_and_Christmas_trees:
  - text: "Swanton Pacific Ranch grows apple orchards, oat hay, pumpkins, and Christmas trees."

  utter_Swanton_Pacific_raises_cattle:
  - text: "Swanton Pacific raises cattle."