Dynamic response selector in rasa chatbot

I have some certain template texts in array Ex: [ I understand that you have questions about '${title}' , Let me help you with that., I definitely can help you to navigate to '${title}', let me find that for you ., I can certainly help you navigate to '${title}', let me find that for you, You requested '${title}' I will help you to find more details, Thanks for selecting '${title}' give me a minute to get the details, All right! You choose '${title}' Give me a minute to get that details., Allow me to give you a few minutes to find out the details of '${title}'., Let give me a few minutes to come up with the details of '${title}'., Okay! You choose '${title}'. Please wait a few seconds to get the details.]

here ${title} i want to replace user selected payloads and the response should be a dynamic one.

After that i need to send this as response into api. so can anyone please help me out.

@Kathir you can use custom action with slots, to get the dynamic values or you the custom code fetch the user value’s, send for API call and generate the response.

Reference video and code:

The first one is the generic process:- Introduction to Rasa Forms | Rasa Tutorial - YouTube | rasa-2.x-form-examples/actions.py at main · RasaHQ/rasa-2.x-form-examples · GitHub

Second: Similar to your use case example (you need to customise the code for your usecase) https://innovationyourself.com/calling-weather-api-in-rasa/

Note: Please see how we mentioned the dynamic value using. { } not with the dollar $ sign.

I hope this will give you better idea and solve you issue. Good Luck!