Robert14
(Robert blanco)
March 5, 2020, 1:25am
1
hello rasa friends i have a issue with the list slot,
will see i have to introduce a paramater in the list for after print a product in template message in messenger,
so when ill change the slot with the append method in python instead of adding a product they change the paramater i introduced before
so the issue is that is any form to don´t change the parameter just add it
regards
mloubser
(Melinda Loubser)
March 9, 2020, 12:12pm
2
Hi @Robert14 , could you give an example of what you’re trying to achieve? The relevant section of your domain file, your custom actions, and an example desired conversation would be helpful.
Robert14
(Robert blanco)
March 17, 2020, 12:11am
3
of course,
class Getcheck(Action):
def name(self):
return 'action_check'
def run(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
piz=next(tracker.get_latest_entity_values("tipo_p"), None)
caja= ['hola']
caja.append(piz)
dispatcher.utter_message('se a introducido {} correctamente '.format(piz))
message = {
"text": "desaria ordenar otra cosa:",
"quick_replies": [
{
"content_type": "text",
"title": "si",
"payload": "ordenar",
}, {
"content_type": "text",
"title": "no",
"payload": "quiero ver el carrito",
}
]
}
dispatcher.utter_message(json_message=message)
after this first time, if the customer want to add other pizza i need what a tuple add other parameter and print in list slot,
the issue is when the costumer accesses for the second time the list change the firs parameter instead of changing it
thanks for you reply
regards
mloubser
(Melinda Loubser)
March 17, 2020, 8:56pm
4
Ok, let me know if I’m understanding you right:
For every time the user adds a pizza, you want the pizza type to be appended to a list
slot?
Robert14
(Robert blanco)
March 28, 2020, 4:44pm
5
yeah that is the short answer