Hi can anybody please help me to fetch custom payload value. like above I have mention in my files:
nlu.md
intent:inform
- {‘slot_name’:‘21466cba-e2b5-554f-8110-07b925737e2d’}
- {‘slot_name’:‘32b2c416-8af7-55cd-a883-cdc42e2e8408’}
- {‘slot_name’:‘5bf40805-79e4-5ee7-a64b-b8933aee6ae3’}
- {‘slot_name’:‘45ea0fed-ce2f-5be9-acf2-c164d0ce8b8c’}
- {‘slot_name’:‘1fff8dfc-2eae-5e52-a877-41bcbe9875eb’}
domain.yml
entities:
- name
- balance
- slot_name
slots:
slot_name:
type: text
stories.md
happy path
- greet
- action_hello_world
- check_balance
- action_hello_world
- mini_statement
- action_statement
action.py
if intent_name == 'check_balance':
data = []
for (id, acc_no) in zip(ac_ids, accounts):
data.append({"label": acc_no, "value": "inform{'slot_name':" + id+"}"})
# data.append({"label": acc_no, "value": "/" + id})
message = {"payload": "dropDown", "data": data}
dispatcher.utter_message(text="Please select account number", json_message=message)
Thanks in advance !!!