Need help to perform the Mathematical calculation in rasa chatbot

How can I perform the calculation based on the user input such as basic income = 10000 deposit = 2000. find the sum and display this on chatbot UI ? do I have to write an action.py file for this ?

Yep, you need a custom action to do this. You could write a rule to predict this custom action given the intent and entity you’re expecting for the user input. Then in the custom action you can make the calculation and display the output using dispatcher.utter_message.

Read more about implementing a custom action here. Feel free to ask a followup question if you get stuck!

@fkoerner

Hi fkoerner,

Thank you very much for your help. I just wanted to know is there any way to define Form name in stories.yml file (not in stories.md file) since I am using .yml fles.

Forms are not defined in the stories.yml file, but rather the domain.yml. Read more about how to define a form here.

@fkoerner Many thanks for your reply, Can you help me with " [Continuous socket IO connect and disconnect in console" issue.

Do you have more information about the exception that was raised?

@fkoerner thank you very much for your response, apologies not to reply sooner, the issue was with the rasa latest version which happened two days back. Fixed now. thank you once again.

1 Like

Great, glad to hear it! Happy bot-building :slight_smile: