diff --git a/config/config.yml b/config/config.yml index 23226d3..50a0f65 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,31 +1,6 @@ recipe: default.v1 language: en pipeline: -- name: LLMBasedRouter - calm_entry: - sticky: "handles everything else, including finance and pizza orders" - nlu_entry: - sticky: "handles everything around health advice and hotel or restaurant bookings" - non_sticky: "handles chitchat" -- name: WhitespaceTokenizer -- name: CountVectorsFeaturizer -- name: CountVectorsFeaturizer - analyzer: char_wb - min_ngram: 1 - max_ngram: 4 -- name: LogisticRegressionClassifier - max_iter: 100 - solver: lbfgs - tol: 0.0001 - random_state: 42 - ranking_length: 10 -- name: CRFEntityExtractor -- name: DucklingEntityExtractor - url: "http://localhost:8000" - dimensions: [ "time", "number" ] - timezone: "Europe/Berlin" - timeout: 3 -- name: NLUCommandAdapter - name: SingleStepLLMCommandGenerator llm: model: gpt-4 @@ -34,9 +9,6 @@ pipeline: top_p: 0.0 policies: -- name: RulePolicy -- name: TEDPolicy - constrain_similarities: true - name: FlowPolicy - name: EnterpriseSearchPolicy - name: IntentlessPolicy diff --git a/config/multistep-config.yml b/config/multistep-config.yml index 71d5c74..47b4b29 100644 --- a/config/multistep-config.yml +++ b/config/multistep-config.yml @@ -1,31 +1,6 @@ recipe: default.v1 language: en pipeline: -- name: LLMBasedRouter - calm_entry: - sticky: "handles everything else, including finance and pizza orders" - nlu_entry: - sticky: "handles everything around health advice and hotel or restaurant bookings" - non_sticky: "handles chitchat" -- name: WhitespaceTokenizer -- name: CountVectorsFeaturizer -- name: CountVectorsFeaturizer - analyzer: char_wb - min_ngram: 1 - max_ngram: 4 -- name: LogisticRegressionClassifier - max_iter: 100 - solver: lbfgs - tol: 0.0001 - random_state: 42 - ranking_length: 10 -- name: CRFEntityExtractor -- name: DucklingEntityExtractor - url: "http://localhost:8000" - dimensions: [ "time", "number" ] - timezone: "Europe/Berlin" - timeout: 3 -- name: NLUCommandAdapter - name: MultiStepLLMCommandGenerator llm: model: gpt-3.5-turbo-0125 @@ -34,9 +9,6 @@ pipeline: top_p: 0.0 policies: -- name: RulePolicy -- name: TEDPolicy - constrain_similarities: true - name: FlowPolicy assistant_id: 20240418-073244-narrow-archive diff --git a/data/e2e_stories.yml b/data/e2e_stories.yml deleted file mode 100644 index 537a15e..0000000 --- a/data/e2e_stories.yml +++ /dev/null @@ -1,35 +0,0 @@ -# These stories are not strictly necessary for the bot to reply, but we need them to -# test for the reply -version: "3.1" -stories: -- story: free transfers - steps: - - user: Are transfers free on this app? - - action: utter_free_transfers - -- story: free transfers - steps: - - user: Are there any fees associated with sending money? - - action: utter_free_transfers - -- story: international transfers - steps: - - user: Do you support international transfers? - - action: utter_domestic_transfers_only - -- story: contact handle - steps: - - user: What is a contact handle in FinX? - - action: utter_contact_handle_info - -- story: user asks why location is relevant for verification - steps: - - action: utter_ask_based_in_california - - user: Why do you need to know this? - - action: utter_california_compliance - -- story: user refuses to give information - steps: - - action: utter_ask_verify_account_sufficient_california_income - - user: That's non of your business! - - action: utter_california_compliance diff --git a/data/flows/add_card.yml b/data/flows/add_card.yml index 7732ac0..7aa36e4 100644 --- a/data/flows/add_card.yml +++ b/data/flows/add_card.yml @@ -2,9 +2,5 @@ flows: add_card: description: add a card to your account name: add a card - nlu_trigger: - - intent: - name: add_card - confidence_threshold: 0.9 steps: - action: utter_card_added diff --git a/data/flows/add_contact.yml b/data/flows/add_contact.yml index af26350..1843d7a 100644 --- a/data/flows/add_contact.yml +++ b/data/flows/add_contact.yml @@ -2,10 +2,6 @@ flows: add_contact: description: add a contact to your contact list name: add a contact - nlu_trigger: - - intent: - name: add_contact - confidence_threshold: 0.9 steps: - collect: add_contact_handle description: a user handle starting with @ diff --git a/data/flows/nlu.yml b/data/flows/nlu.yml deleted file mode 100644 index befe373..0000000 --- a/data/flows/nlu.yml +++ /dev/null @@ -1,230 +0,0 @@ -version: "3.1" - -nlu: - - intent: replace_card - examples: | - - I need to replace my card. - - Can you help me with a card replacement? - - I lost my card, can I get a replacement? - - My card is damaged, I need a new one. - - Help me order a replacement card. - - Replace my current card, please. - - I need a new card issued. - - My card was stolen, I need a new one. - - Can you issue me a replacement card? - - I need to replace my lost card. - - I want to report my card lost and get a replacement. - - I need to get a replacement for my worn-out card. - - I need a new card, mine is missing. - - I need to replace my expired card. - - I need assistance with replacing my card. - - Can you help me get a new card issued? - - - intent: add_card - examples: | - - I want to add a card to my account. - - I need to add a card to my profile. - - Please help me add a card. - - Add a new card to my account. - - I want to register a new card on my account. - - I need to link a card to my account. - - Please add a card to my account. - - Help me add a credit card to my profile. - - I want to add a debit card to my account. - - Can you attach this card to my account? - - I need to connect a card to my account. - - Add this card to my account, please. - - Can I add another card to my profile? - - How do I save a new card to my account? - - I need to input a new card to my account. - - Can you help me store a new card on my account? - - Please add this card to my account details. - - I want to link a new payment card to my account. - - How do I add a credit card to my profile? - - - intent: verify_account - examples: | - - I need to verify my account for higher transfer limits. - - I want to verify my account for larger transfers. - - Verify my account to raise my transfer limits. - - Help me verify my account to increase my transfer capacity. - - Help me verify my account. - - I need to upgrade my transfer limits by verifying my account. - - Please verify my account for increased transfer limits. - - I want to verify my details for higher transfer limits. - - Assist me in verifying my account. - - What are the steps to verify my account for larger transfers? - - Verify my account so I can transfer more funds. - - Can I get my account verified for higher transaction limits? - - I need to authenticate my account for higher transfer limits. - - Help me with the process to verify my account for higher transfers. - - Help me with the process to verify my account. - - I want to verify my account for extended transfer limits. - - Can you verify my account? - - What do I need to verify for higher transfer allowances? - - Guide me through account verification. - - I need a higher transfer limit; can you verify my account? - - - intent: add_contact - examples: | - - I need to add a new contact. - - Can you help me add a contact? - - How do I add John to my contacts? - - Please add a contact for me. - - Add a new contact to my list. - - I want to save a new contact. - - Can you save this contact for me? - - Help me add a contact. - - Add Max to my contacts. - - I need to enter a new contact. - - How can I add a contact? - - Save a new contact to my directory. - - Include a new contact in my list, please. - - I want to include a new contact. - - Help me save a new contact. - - Add a contact to my address book. - - I need to input a new contact. - - Please help me add Jane to my contacts. - - Add a friend to my contacts. - - Can you create a new contact for me? - - I want to add Paula to my contacts. - - Add a new entry to my contact list. - - Help me store a new contact. - - - intent: remove_contact - examples: | - - I need to remove a contact. - - Can you help me delete a contact? - - How do I remove Max from my contacts? - - Please delete a contact for me. - - Remove a contact from my list. - - I want to delete a contact. - - Can you take John off my contact list? - - Help me remove a contact. - - Delete Tom from my contacts. - - I need to erase a contact. - - How can I delete a contact? - - Remove a contact from my directory. - - Exclude a contact from my list, please. - - Can you delete a contact from my phonebook? - - I want to erase a contact. - - Help me delete a contact. - - Remove a contact from my address book. - - I need to get rid of a contact. - - Please help me remove Paula from my contacts. - - Erase this number from my contacts. - - Delete a friend from my contacts. - - Can you remove a contact for me? - - I want to delete Alex from my contacts. - - Remove an entry from my contact list. - - Help me delete a contact permanently. - - - intent: request_pizza - examples: | - - Can i get a pizza please? - - I would like to order a pizza. - - I would like to order a [margherita](pizza_type) pizza. - - I want to order a [pepperoni](pizza_type) pizza. - - I would like to order a [vegetarian](pizza_type) pizza. - - I want to order a [hawaiian](pizza_type) pizza. - - I would like to order a [diavola](pizza_type) pizza. - - I would like to order a [quattro formaggi](pizza_type) pizza. - - - intent: inform_pizza_type - examples: | - - [margherita](pizza_type) - - [pepperoni](pizza_type) - - [vegetarian](pizza_type) - - [hawaiian](pizza_type) - - [diavola](pizza_type) - - [quattro formaggi](pizza_type) - - a [margherita](pizza_type) pizza - - a [pepperoni](pizza_type) pizza - - a [vegetarian](pizza_type) pizza - - a [hawaiian](pizza_type) pizza - - a [diavola](pizza_type) pizza - - a [quattro formaggi](pizza_type) and a [margherita](pizza_type) pizza - - a [quattro formaggi](pizza_type) and a [pepperoni](pizza_type) pizza - - a [quattro formaggi](pizza_type) and a [vegetarian](pizza_type) pizza - - a [quattro formaggi](pizza_type) and a [hawaiian](pizza_type) pizza - - a [quattro formaggi](pizza_type) and a [diavola](pizza_type) pizza - - - intent: inform_address - examples: | - - 1234 Main Street - - 56 Elm Road - - 789 Maple Avenue - - 1011 Oak Drive - - 1213 Pine Lane - - 1415 Cedar Court - - - intent: inform_num_pizza - examples: | - - [1](number) please - - [2](number) please - - [3](number) pizzas - - [4](number) pizzas - - - intent: correct_order - examples: | - - I actually need to update my order. - - I made a mistake in my order. - - I need to change my order. - - I made a mistake in the delivery address. - - I need to update the delivery address. - - I made a mistake in the payment option. - - - intent: correct_num_pizza - examples: | - - I actually want to order [2](number) pizzas. - - Need [10](number) pizzas now instead. - - I actually want to order [3](number) pizzas. - - I actually want to order [4](number) pizzas. - - I actually want to order [5](number) pizzas. - - I actually want to order [6](number) pizzas. - - I actually want to order [7](number) pizzas. - - I actually want to order [8](number) pizzas. - - I actually want to order [9](number) pizzas. - - I actually want to order [10](number) pizzas. - - - intent: correct_pizza_type - examples: | - - I actually want to order a [margherita](pizza_type) pizza. - - I actually want to order a [pepperoni](pizza_type) pizza. - - I actually want to order a [vegetarian](pizza_type) pizza. - - I actually want to order a [hawaiian](pizza_type) pizza. - - I actually want to order a [diavola](pizza_type) pizza. - - I actually want to order a [quattro formaggi](pizza_type) pizza. - - Actually, can i get a [margherita](pizza_type) instead. - - Actually, can i get a [pepperoni](pizza_type) instead. - - Actually, can i get a [vegetarian](pizza_type) instead. - - Actually, can i get a [hawaiian](pizza_type) instead. - - Actually, can i get a [diavola](pizza_type) instead. - - Actually, can i get a [quattro formaggi](pizza_type) instead. - - - intent: correct_address - examples: | - - I actually want to change the delivery address to 13 Pine Road. - - actually can i get the pizza delivered to 13 Pine Road. - - I made a mistake and need to update my delivery address first to 43 Elm Street. - - Send the pizza to 25 Maple Avenue instead. - - I need to update the delivery address to 59 Oak Drive. - - - intent: correct_payment_option - examples: | - - Can I pay with credit card instead? - - I actually want to pay with membership points. - - - intent: affirm - examples: | - - Yes, that's correct. - - Yes, that's right. - - Yes, that's it. - - Yes - - - intent: deny - examples: | - - No, that's not right. - - No, that's incorrect. - - No, that's not it. - - No diff --git a/data/flows/order_pizza.yml b/data/flows/order_pizza.yml deleted file mode 100644 index 97c0975..0000000 --- a/data/flows/order_pizza.yml +++ /dev/null @@ -1,98 +0,0 @@ -flows: - order_pizza: - name: order pizza - description: user asks for a pizza - nlu_trigger: - - intent: - name: request_pizza - confidence_threshold: 0.5 - steps: - - call: fill_pizza_order - next: - - if: slots.confirmation_order - then: payment_options - - else: cancel_order - - id: payment_options - collect: payment_option - next: - - if: slots.payment_option is 'card' - then: use_card_details - - if: slots.payment_option is 'membership_points' - then: use_membership_points - - else: cancel_order - - id: use_card_details - collect: card_details - next: - - if: slots.card_details and slots.confirmation_order - then: take_payment - - else: cancel_order - - id: take_payment - action: utter_execute_payment - next: END - - id: use_membership_points - call: use_membership_points - next: - - if: slots.membership_points and slots.confirmation_order - then: take_payment - - else: cancel_order - - id: cancel_order - action: utter_cancel_order - next: END - - fill_pizza_order: - name: fill pizza order - description: user is asked to fill out pizza order details - steps: - - collect: pizza - - collect: num_pizza - - collect: address - - collect: confirmation_order - reset_after_flow_ends: False - ask_before_filling: True - - use_membership_points: - if: False - name: use membership points - description: user asks to use membership or loyalty points - steps: - - call: authenticate_user - next: - - if: slots.is_user_logged_in - then: - - action: action_check_points - next: END - - else: END - - correct_order: - name: correct_order - description: user wants to correct order details - nlu_trigger: - - intent: - name: correct_order - confidence_threshold: 0.5 - steps: - - collect: correct_order - - call: fill_pizza_order - - correct_address: - name: correct_address - description: user wants to correct the delivery address - nlu_trigger: - - intent: - name: correct_address - confidence_threshold: 0.7 - steps: - - action: action_correct_address - - call: fill_pizza_order - - job_vacancies: - name: job vacancies - description: user asks for job vacancies - steps: - - collect: department - next: - - if: slots.department - then: show_vacancies - - else: END - - id: show_vacancies - action: action_show_vacancies diff --git a/data/flows/patterns.yml b/data/flows/patterns.yml index 4ed6009..93fea2c 100644 --- a/data/flows/patterns.yml +++ b/data/flows/patterns.yml @@ -51,7 +51,6 @@ flows: name: pattern completed steps: - action: utter_can_do_something_else - - action: action_reset_routing pattern_clarification: description: Conversation repair flow for handling ambiguous requests that could match multiple flows diff --git a/data/flows/remove_contact.yml b/data/flows/remove_contact.yml index 2938547..06b37ae 100644 --- a/data/flows/remove_contact.yml +++ b/data/flows/remove_contact.yml @@ -2,10 +2,6 @@ flows: remove_contact: name: remove a contact description: remove a contact from your contact list - nlu_trigger: - - intent: - name: remove_contact - confidence_threshold: 0.9 steps: - collect: remove_contact_handle description: a contact handle starting with @ diff --git a/data/flows/replace_card.yml b/data/flows/replace_card.yml index ac350a1..a7ae897 100644 --- a/data/flows/replace_card.yml +++ b/data/flows/replace_card.yml @@ -2,10 +2,6 @@ flows: replace_card: description: the user needs to replace their card name: replace_card - nlu_trigger: - - intent: - name: replace_card - confidence_threshold: 0.9 steps: - collect: confirm_correct_card ask_before_filling: true diff --git a/data/flows/transfer_money.yml b/data/flows/transfer_money.yml index 78986a4..ddf41d4 100644 --- a/data/flows/transfer_money.yml +++ b/data/flows/transfer_money.yml @@ -2,7 +2,6 @@ flows: transfer_money: description: send money to friends and family name: transfer money - always_include_in_prompt: True steps: - collect: transfer_money_recipient description: the name of a person diff --git a/data/flows/verify_account.yml b/data/flows/verify_account.yml index 51cb95b..0be8d8d 100644 --- a/data/flows/verify_account.yml +++ b/data/flows/verify_account.yml @@ -2,10 +2,6 @@ flows: verify_account: name: verify account description: Verify an account for higher transfer limits - nlu_trigger: - - intent: - name: verify_account - confidence_threshold: 0.9 steps: - collect: verify_account_email ask_before_filling: true diff --git a/data/nlu-based/nlu.yml b/data/nlu-based/nlu.yml deleted file mode 100644 index c98eb0b..0000000 --- a/data/nlu-based/nlu.yml +++ /dev/null @@ -1,217 +0,0 @@ -version: "3.1" - -nlu: -- intent: greet - examples: | - - hey - - hello - - hi - - hello there - - good morning - - good evening - - moin - - hey there - - let's go - - hey dude - - goodmorning - - goodevening - - good afternoon - -- intent: goodbye - examples: | - - cu - - good by - - cee you later - - good night - - bye - - goodbye - - have a nice day - - see you around - - bye bye - - see you later - - thanks, bye - - great, goodbye - -- intent: ask_help - examples: | - - help - - i need help - - i need assistance - - I don't understand - - I still don't understand - - I want to talk to a human - - get me a human - - help me - - assist - - I don't get it - - heeeeeeelp - - get me a human on the line - -- intent: stop - examples: | - - stop that - - I don't want to continue - - cancel - - stop - - I don't want to book a restaurant, stop it - - stop it - - cancel this - -- intent: health_advice - examples: | - - I need some medical advice. - - Can you help me with some health issues? - - I need medical support. - - I'm experiencing some symptoms and I need guidance on what to do. - - Can you provide me with health recommendations? - - I'm struggling with some health concerns. Can you offer advice? - - Can you suggest ways to improve my overall well-being? - - I'm looking for tips on managing stress and anxiety. Any advice? - - I have a specific health question. Can you offer me some insights? - - I need suggestions on maintaining a healthy diet and exercise routine. - - Is there anyone knowledgeable about natural remedies who can give me advice? - - Can you provide me with information on preventing common illnesses? - - I'm interested in learning about alternative therapies. Can you share your expertise? - - Can you recommend a good doctor? I'm not feeling well. - -- intent: hotel_search - examples: | - - I need to find a hotel. - - Can you help me search for hotels? - - Please search for hotels in my area. - - Find hotels near me. - - I want to look for hotels. - - Can you locate hotels for me? - - Help me find a hotel. - - Search for hotel options nearby. - - I need a hotel for my trip. - - How can I search for hotels? - - Look up hotels in this city. - - Show me hotels in the area. - - Can you recommend any hotels? - - I want to see available hotels. - - Help me locate a hotel. - - Find some hotels for me. - - I need hotel suggestions. - - Please find a hotel where I can stay. - - Search for hotels around this place. - - Can you find nearby hotels? - - I’m looking for hotels in the vicinity. - - Help me search for a place to stay. - - Show available hotels for my stay. - -- intent: list_restaurants - examples: | - - Do you know any good restaurant? - - Any restaurant recommendations? - - I want to look at different restaurants - - Can you show me some restaurant options? - - list restaurants - - restaurants - - Suggest some eateries nearby - - What are the best dining places around? - - I need a place to eat, can you help? - - Recommend some restaurants for dinner - - Where can I go for a good meal? - - Show me the top restaurants in this area - - Find me some good places to eat - - I'm looking for restaurant suggestions - - Are there any popular restaurants nearby? - - Could you provide a list of restaurants? - - Give me a few restaurant choices - - What are some nice places to dine? - - Help me find a restaurant - - What are some top-rated restaurants? - -- intent: request_restaurant - examples: | - - book a restaurant - - I want a place to eat - - I'm hungry. Can you book me a restaurant please? - - Find me a table for dinner - - Can you make a reservation at a restaurant for me? - - I need to book a place for lunch - - Reserve a table for [two](number) - - Help me book a restaurant - - I need a restaurant reservation - - Can you get me a spot at a nice restaurant? - - Find a good place to eat and make a reservation - - I'd like to book a table for tonight - - Can you book a restaurant for [four](number) people? - - I need a dinner reservation - - Can you arrange a lunch spot for me? - - I want to reserve a table for dinner - - Make a restaurant booking for me - - Can you book a table at an [Italian](cuisine) restaurant? - - I need a reservation at a [French](cuisine) restaurant - - I want to eat out, can you book a place? - - Book a dinner spot for me - - Reserve a lunch table - - Can you find and book a restaurant? - - Arrange a restaurant reservation for me - - Can you get a dinner reservation for me? - - I would like to book a place to eat - - Can you reserve a table at a nearby restaurant? - - Book a restaurant for tonight - - Secure a table for dinner - - I need to book a restaurant for a special occasion - -- intent: inform - examples: | - - [Italian](cuisine) - - [Asian](cuisine) cuisine - - how about [Italian](cuisine) cuisine - - [European](cuisine) - - I really like [Greek](cuisine) - - I'm interested in [Italian](cuisine) cuisine. - - We're looking for [Japanese](cuisine) food. - - I'd like to try some [Mexican](cuisine) dishes. - - We're aiming for [Indian](cuisine) cuisine. - - I'm in the mood for [Thai](cuisine) food. - - We're seeking out [French](cuisine) cuisine. - - I'd love to have some [Chinese](cuisine) food. - - We're thinking about [Mediterranean](cuisine) cuisine. - - We're craving some [Korean](cuisine) dishes. - - I'd like to experience [Lebanese](cuisine) food. - - We are [4](number) people - - [5](number) - - [3](number) people - - Just [2](number) - - We are a party of [three](number). - - There are [six](number) of us. - - Our group consists of [eight](number) people. - - We will be a total of [four](number). - - There are [five](number) people in our group. - - We are a duo, just [two](number) people. - - The reservation is for [seven](number) people. - - We’ve got a group of [nine](number). - - There will be [ten](number) of us. - - It's a small group; we're just [three](number). - - [Cafe de Klos](restaurant_name) - - Yes, please book a table at The [Grand Bistro](restaurant_name). - - I have a place in mind: [Olive Garden](restaurant_name). - - I'd like to make a reservation at [Sushi Haven](restaurant_name). - - Please reserve a table at [La Bella Italian Restaurant](restaurant_name). - - I'm thinking about dining at [The Seafood Shack](restaurant_name). - - Could you book a table at [Gourmet Garden](restaurant_name)? - - Yes, we prefer [Urban Thai Cuisine](restaurant_name). - - I have a favorite: [Mama Mia’s Pizzeria](restaurant_name). - - I’d like to try out The [French Café](restaurant_name). - - Make the reservation for December 25th at 7:00 PM. - - I’d like the reservation on April 15th at 12:30 PM. - - Please book it for tomorrow at 8:45 AM. - - Reserve it for October 10th at 5:00 PM. - - Schedule the reservation on March 21st at 6:00 PM. - - I'm looking at next week Wednesday at 1:15 PM for the reservation. - - Make the booking for August 9th at 9:00 PM. - - I prefer December 1st at 11:00 AM for the reservation. - - Set the reservation for May 5th at 2:30 PM. - - Book it for today at 4:00 PM. - - I'm currently in Paris. - - Right now, I'm in the vibrant city of New York. - - My location is Sydney. - - I find myself in Berlin at the moment. - - Currently, I'm situated in Barcelona. - - The city I'm residing in is Dubai. - - Rio de Janeiro - - Toronto diff --git a/data/nlu-based/rules.yml b/data/nlu-based/rules.yml deleted file mode 100644 index 8a9604a..0000000 --- a/data/nlu-based/rules.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: "3.1" - -rules: - -- rule: greeting - steps: - - intent: greet - - action: utter_greet - -- rule: goodbye - steps: - - intent: goodbye - - action: utter_goodbye - -- rule: list restaurants - steps: - - intent: list_restaurants - - action: action_list_restaurants - - action: action_reset_routing - -- rule: health advice - steps: - - intent: health_advice - - action: utter_cant_advice_on_health - - action: action_reset_routing - -- rule: hotel search - steps: - - intent: hotel_search - - action: action_search_hotel - - action: utter_hotel_inform_rating - - action: action_reset_routing - -- rule: activate restaurant form - steps: - - intent: request_restaurant - - action: restaurant_form - - active_loop: restaurant_form - -- rule: submit restaurant form - condition: - - active_loop: restaurant_form - steps: - - action: restaurant_form - - active_loop: null - - slot_was_set: - - requested_slot: null - - action: utter_restaurant_form_submit - - action: utter_restaurant_available - - action: action_reset_routing diff --git a/data/nlu-based/stories.yml b/data/nlu-based/stories.yml deleted file mode 100644 index 8f890dc..0000000 --- a/data/nlu-based/stories.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "3.1" - -stories: - -- story: help - steps: - - intent: ask_help - - action: utter_help - - intent: ask_help - - action: utter_handover - - action: action_reset_routing - -- story: User interrupts the form and doesn't want to continue - steps: - - intent: request_restaurant - - action: restaurant_form - - active_loop: restaurant_form - - intent: stop - - action: utter_ask_continue - - intent: stop - - action: action_deactivate_loop - - action: action_reset_routing - - active_loop: null diff --git a/domain/_shared.yml b/domain/_shared.yml index 836dabd..a1e4f01 100644 --- a/domain/_shared.yml +++ b/domain/_shared.yml @@ -1,17 +1,10 @@ version: "3.1" -intents: - - ask_help - slots: return_value: type: any mappings: - type: from_llm - route_session_to_calm: - type: bool - mappings: - - type: from_llm responses: utter_goodbye: diff --git a/domain/flows/add_card.yml b/domain/flows/add_card.yml index 82b9004..7abaece 100644 --- a/domain/flows/add_card.yml +++ b/domain/flows/add_card.yml @@ -1,8 +1,5 @@ version: "3.1" -intents: - - add_card - responses: utter_card_added: - text: Okay, added another card. diff --git a/domain/flows/add_contact.yml b/domain/flows/add_contact.yml index b2eaa70..0017563 100644 --- a/domain/flows/add_contact.yml +++ b/domain/flows/add_contact.yml @@ -1,8 +1,5 @@ version: "3.1" -intents: - - add_contact - actions: - add_contact diff --git a/domain/flows/order_pizza.yml b/domain/flows/order_pizza.yml deleted file mode 100644 index 6210b05..0000000 --- a/domain/flows/order_pizza.yml +++ /dev/null @@ -1,129 +0,0 @@ -version: "3.1" - -intents: - - greet - - request_pizza - - inform_pizza_type - - inform_address - - inform_num_pizza - - correct_order - - correct_num_pizza - - correct_pizza_type - - correct_address - - correct_payment_option - - affirm - - deny - -entities: - - pizza_type - - department - -slots: - pizza: - type: text - mappings: - - type: from_entity - entity: pizza_type - num_pizza: - type: float - mappings: - - type: from_entity - entity: number # this is defined in the restaurant.yml domain file - intent: inform_num_pizza - conditions: - - active_flow: fill_pizza_order - - type: from_entity - entity: number - intent: correct_num_pizza - conditions: - - active_flow: fill_pizza_order - - active_flow: order_pizza - address: - type: text - mappings: - - type: from_text - intent: inform_address - conditions: - - active_flow: fill_pizza_order - confirmation_order: - type: bool - mappings: - - type: from_intent - intent: affirm - value: true - conditions: - - active_flow: fill_pizza_order - - type: from_intent - intent: deny - value: false - conditions: - - active_flow: fill_pizza_order - membership_points: - type: float - mappings: - - type: custom - action: action_check_points - payment_option: - type: categorical - values: - - card - - membership_points - mappings: - - type: from_llm - card_details: - type: text - mappings: - - type: from_llm - correct_order: - type: bool - mappings: - - type: custom - department: - type: text - mappings: - - type: from_entity - entity: department - -responses: - utter_ask_pizza: - - text: What type of pizza would you like to order? - - utter_place_order: - - text: Your order for a {pizza} pizza has been placed. It will be delivered to {address} in 30 minutes. - - utter_ask_num_pizza: - - text: How many pizzas would you like to order? - - utter_ask_address: - - text: What is the delivery address? - - utter_confirm: - - text: You have put in a order for {num_pizza} {pizza} pizzas. Please confirm the details above are correct? - - utter_cancel_order: - - text: Your order has been cancelled. - - utter_use_points: - - text: You have successfully used {membership_points} membership points. - - utter_no_points: - - text: You have no membership points. - - utter_ask_payment_option: - - text: How would you like to pay for your order? - - utter_ask_card_details: - - text: Please provide your card number. - - utter_execute_payment: - - text: Your payment has been processed. - - utter_ask_department: - - text: Which department would you like to apply to? - -actions: - - action_ask_confirmation_order - - action_check_points - - action_ask_correct_order - - action_show_vacancies - - action_correct_address diff --git a/domain/flows/remove_contact.yml b/domain/flows/remove_contact.yml index afad356..c08c4ca 100644 --- a/domain/flows/remove_contact.yml +++ b/domain/flows/remove_contact.yml @@ -1,8 +1,5 @@ version: "3.1" -intents: - - remove_contact - actions: - remove_contact - action_ask_remove_contact_handle diff --git a/domain/flows/replace_card.yml b/domain/flows/replace_card.yml index fe4d7c0..0347aae 100644 --- a/domain/flows/replace_card.yml +++ b/domain/flows/replace_card.yml @@ -1,8 +1,5 @@ version: "3.1" -intents: - - replace_card - slots: confirm_correct_card: type: bool diff --git a/domain/nlu-based/health_advice.yml b/domain/nlu-based/health_advice.yml deleted file mode 100644 index 0b3776f..0000000 --- a/domain/nlu-based/health_advice.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.1" - -intents: - - health_advice - -responses: - utter_cant_advice_on_health: - - text: I'm sorry, I can't give you advice on your health. - \ No newline at end of file diff --git a/domain/nlu-based/hotel_search.yml b/domain/nlu-based/hotel_search.yml deleted file mode 100644 index 0595286..0000000 --- a/domain/nlu-based/hotel_search.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: "3.1" - -intents: - - hotel_search - -actions: - - action_search_hotel - -slots: - hotel_name: - type: text - mappings: - - type: custom - hotel_average_rating: - type: float - mappings: - - type: custom - -responses: - utter_hotel_inform_rating: - - text: The {hotel_name} has an average rating of {hotel_average_rating} \ No newline at end of file diff --git a/domain/nlu-based/restaurant.yml b/domain/nlu-based/restaurant.yml deleted file mode 100644 index 5e9162a..0000000 --- a/domain/nlu-based/restaurant.yml +++ /dev/null @@ -1,92 +0,0 @@ -version: "3.1" - -intents: - - stop - - request_restaurant - - inform - - list_restaurants - - goodbye - -entities: -- cuisine -- number -- time -- location -- restaurant_name - -slots: - city: - type: text - mappings: - - type: from_entity - entity: location - cuisine: - type: categorical - values: - - Italian - - Japanese - - Indian - - Mexican - - French - - Chinese - - Mediterranean - - Thai - mappings: - - type: from_entity - entity: cuisine - num_people: - type: any - mappings: - - type: from_entity - entity: number - restaurant_name: - type: text - mappings: - - type: from_entity - entity: restaurant_name - restaurant_time: - type: text - mappings: - - type: from_entity - entity: time - -actions: - - action_list_restaurants - - validate_restaurant_form - - action_ask_restaurant_form_cuisine - - action_ask_restaurant_form_restaurant_name - -forms: - restaurant_form: - ignored_intents: - - greet - - goodbye - required_slots: - - city - - cuisine - - restaurant_name - - num_people - - restaurant_time - -responses: - utter_restaurant_form_submit: - - text: Let me check if the restaurant {restaurant_name} is available on {restaurant_time} for {num_people}. - utter_restaurant_available: - - text: You are lucky, they have a table available for you. The reservation is confirmed. - utter_ask_restaurant_form_num_people: - - text: How many people are you? - utter_ask_restaurant_form_restaurant_time: - - text: What date and time do you want me to make the reservation? - utter_ask_restaurant_form_city: - - text: What city are you in? - buttons: - - title: "Berlin" - payload: '/inform{{"location":"berlin"}}' - - title: "Amsterdam" - payload: '/inform{{"location":"amsterdam"}}' - utter_ask_continue: - - text: Are you sure? - utter_handover: - - text: I'm handing over to a human now. I'm sorry, I could not help. - utter_cannot_handle_other_city: - - text: I'm sorry, but I can only book a restaurant in Berlin or Amsterdam.