I need some help please , the buttons used to work but suddenly i got this error despite i didn’t made any changes … Any suggestions please ??
Hi!
What rasa version are you using?
Can you make a little test just using just one {} ?
{"title": "happy" , "payload": '/happy{"slot_name":"just a test"}'}
my actions.py
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
class ActionHelloWorld(Action):
def name(self) -> Text:
return "action_hello_world"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
buttons = []
#append the response of API in the form of title and payload
buttons.append({"title": "happy" , "payload": '/happy{"slot_name":"just a test"}'})
#then display it using dispatcher
dispatcher.utter_message(text="message you want to display" , buttons=buttons)
return []
my domain.yml
version: "3.0"
entities:
- slot_name
intents:
- greet
- happy
actions:
- action_hello_world
slots:
slot_name:
type: text
mappings:
- type: from_entity
entity: slot_name
responses:
utter_happy:
- text: "Great, carry on! {slot_name}"
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
It works now thank you
