Hi, I want to use the stored slot value further in conversation so, how can I do this?
any example, resource or explanation would be appreciated.
Thanks!
Hi, I want to use the stored slot value further in conversation so, how can I do this?
any example, resource or explanation would be appreciated.
Thanks!
If a slot is set with the user’s name, then you could define a response like this:
utter_greet:
- text: Nice to meet you, {slot_name}.
Hello @ritik872000
You can either use variables in response templates as @alexyuwen has suggested, or you can use a custom action. For example with the Python SDK:
from typing import Text, Dict, Any, List
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
class ActionCheckRestaurants(Action):
def name(self) -> Text:
return "action_check_restaurants"
def run(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
cuisine = tracker.get_slot("cuisine")
dispatcher.utter_message(text=f"The value of 'cuisine ' is '{cuisine}'")
return []
With custom actions you can also do any kind of processing that you might want to do with the data that you’ve stored in slots.
I have implemented till here still thank you very much for explaining in brief:)
Thanks @alexyuwen I got what I was looking for