Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Created June 4, 2024 02:04
Show Gist options
  • Save ehzawad/4949cde5f4b85af08ff4857815530f77 to your computer and use it in GitHub Desktop.
Save ehzawad/4949cde5f4b85af08ff4857815530f77 to your computer and use it in GitHub Desktop.
A sample domain.yml for managing flow
version: "3.1"
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- mtb_credit_card_opening
entities:
- process_interruption
- process_continue_status
- process_state
slots:
process_interruption:
type: float
initial_value: 0
influence_conversation: false
mappings:
- type: from_entity
entity: process_interruption
process_state:
type: text
influence_conversation: false
mappings:
- type: from_entity
entity: process_state
process_continue_status:
type: bool
initial_value: true
influence_conversation: false
mappings:
- type: custom
credit_card_type:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: credit_card_type
credit_card_type_confirm:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: credit_card_type_confirm
salary_range:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: salary_range
salary_range_confirm:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: salary_range_confirm
credit_card_applicant_type:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: credit_card_applicant_type
credit_card_applicant_type_confirm:
type: text
influence_conversation: false
mappings:
- type: from_text
conditions:
- active_loop: mtb_credit_card_opening_form
requested_slot: credit_card_applicant_type_confirm
forms:
mtb_credit_card_opening_form:
required_slots:
- credit_card_type
- credit_card_type_confirm
- salary_range
- salary_range_confirm
- credit_card_applicant_type
- credit_card_applicant_type_confirm
responses:
utter_greet:
- text: "Hey! How are you?"
utter_cheer_up:
- text: "Here is something to cheer you up:"
utter_did_that_help:
- text: "Did that help you?"
utter_happy:
- text: "Great, carry on!"
utter_goodbye:
- text: "Bye"
utter_iamabot:
- text: "I am a bot, powered by Rasa."
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment