POST response - Json Error

The above image shows my rasa custom action in which I am calling an API to get a response in the format :

2

This image shows a python file with exactly the same code(without rasa part). The python file runs fine and returns the above expected output. But during the execution of custom action of rasa, the response is empty([]). It returns this error:

I am not able to understand the problem here.

hey @varunsapre10, the data which you are trying to send using dispatcher.utter_message(result) is in JSON format so if you want to send json data you use the json_message parameter of the dispatcher.utter_message() :sweat_smile:

For your reference: Rasa SDK

Hope it helps :slight_smile:

1 Like

:smile: Thanks @JiteshGaikwad, “json_message” worked for me.