Hi, I am trying to set slot values from API but it is returning none every time. When I suppose to print the data from API, I can able to see the result.
Here is the code class ActionStoreUserData(Action):
def name(self) -> Text:
return "action_store_userdata"
def run(self, dispatcher, tracker, domain):
userid=tracker.sender_id
url='http://localhost/myapimethod'
PARAMS = {'userid':userid}
r = requests.get(url,params=PARAMS)
response = r.text
json_data= json.loads(response)
username = json_data["FullName"]
print("username",username)
return [SlotSet("current_user", username)]