I am using FastAPI, if I use Any or omit the data type it expects the passed param as a query param, but rasa handle_text calls the api with certain object, so it was showing 422.
So I defined the proper data type of reqeuest object and it worked
async def webhook(request: ActionCall):
and somehow it was not taking rasa’s ActionCall object , so i created like this
class ActionCall(BaseModel):
"""
A dictionary representation of an action to be executed.
"""
# the name of the next action to be executed
next_action: Optional[Text]
# id of the source of the messages
sender_id: Text
# current dictionary representation of the state of a conversation
tracker: Dict
# dictionary representation of the domain
domain: Dict
# rasa version
version: Text