are you familiar with rasa , can you provide me with the latest version you are aware of
- User
are you familiar with rasa , can you provide me with the latest version you are aware of
- Assistant
As of my last update in 2023, the latest version of Rasa I'm aware of is Rasa 3.1, which includes significant enhancements both in the Rasa Open Source and Rasa Enterprise. However, the pace of development in the Rasa community is rapid, and newer versions may have been released since. For the most current version and updates, I recommend checking the official Rasa documentation or their GitHub repository.
- User
i have this example interaction , in this example there is 3 loop , each loop try to confirm a parameter , create actions.py and stories.yml :user: hello bot: welcom user : i want an appointment bot : please give me your name user : my name is jhon doe bot : can you confirm the name jhon doe user : no bot : please give me your name user : its john doe can you confirm the name john doe user : yes bot : please give me your phone number user : its 06 23 23 23 23 3 bot : the phone number must contain 10 characters , please give me a correct phone number user : its 06 23 23 23 23 bot : thank you for giving the phone number , which date you want the appointment ? user : i prefer tomorrow bot: next availabe date is : dd/mm/yyyy at houre , do you want to reserve ? user : no bot : next availabe date is : dd/mm/yyyy at houre , do you want to reserve ? user : no bot : next availabe date is : dd/mm/yyyy at houre , do you want to reserve ? user : yes bot : appointment has been save succefully , your appointment reference is 123456 , anything else i can help you with
- Assistant
- User
your solution isnt dynamic as we cant predict the user input , the loops should base on forms and slots ...
- Assistant
- User
give the full code of actions.py
- Assistant
- User
in this part : async def validate_name( self, slot_value: Any, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict, ) -> Dict: # Simple validation for name, you can add custom logic here return {"name": slot_value} // i want the bot to ask for the name , user give his name, the bot ask to confirm , user either affirm (break loop) or deny (bot ask the name again)
- Assistant
- User
i dont see where the bot will ask for the name , is it inside appiontmenet form ? if yes please show it
- Assistant
- User
error :2024-04-11 02:12:39 INFO rasa.cli.train - Started validating domain and training data... YamlValidationException: Failed to validate 'C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml'. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation: in C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml:113: Value 'ordereddict([('patient_name', [ordereddict([('type', 'from_entity'), ('entity', 'patient_name')])])])' is not of type 'str'. Path: '/forms/appointment_form/required_slots/0' in C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml:116: Value 'ordereddict([('phone_number', [ordereddict([('type', 'from_entity'), ('entity', 'phone_number')])])])' is not of type 'str'. Path: '/forms/appointment_form/required_slots/1' in C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml:119: Value 'ordereddict([('date', [ordereddict([('type', 'from_entity'), ('entity', 'desired_date')])])])' is not of type 'str'. Path: '/forms/appointment_form/required_slots/2'
- Assistant
The error message you're seeing is due to an incorrect format in the
formssection of yourdomain.ymlfile under therequired_slotsforappointment_form. Starting from Rasa 3.x, the syntax for defining forms and their required slots has changed slightly, and it's more YAML structure-favored to manage the slot mappings directly under each slot instead of under the form itself.Here's how you should format the
formssection correctly in the domain file, according to the Rasa 3.x syntax:forms: appointment_form: required_slots: patient_name: - type: from_entity entity: patient_name phone_number: - type: from_entity entity: phone_number date: - type: from_entity entity: desired_date - User
2024-04-11 02:15:02 INFO rasa.cli.train - Started validating domain and training data... YamlValidationException: Failed to validate 'C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml'. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation: in C:\Users\Lenovo\Desktop\Test Ground\rasa test\domain.yml:103: Value 'ordereddict([('patient_name', [ordereddict([('type', 'from_entity'), ('entity', 'patient_name')])]), ('phone_number', [ordereddict([('type', 'from_entity'), ('entity', 'phone_number')])]), ('date', [ordereddict([('type', 'from_entity'), ('entity', 'desired_date')])])])' is not a list. Value path: '/forms/appointment_form/required_slots'
(rasa3) C:\Users\Lenovo\Desktop\Test Ground\rasa test>
- Assistant
The error message you encountered indicates a problem with the structure of your
formsdefinition in thedomain.ymlfile. Based on the feedback, it seems there's a misunderstanding in how therequired_slotsare formatted. The error message suggests there's an issue with interpreting the structure as it expects a different format under theappointment_form.Given the error message and your previous content, your
domain.ymlshould follow this corrected structure for Rasa 3.x forms:version: "3.0" forms: appointment_form: required_slots: patient_name: - type: from_entity entity: patient_name phone_number: - type: from_entity entity: phone_number date: - type: from_entity entity: desired_date - User
- Assistant