Get contexts from api.ai result json

I have been testing out api.ai and i wanted to get the contexts json from the results received so that i can add the original terms in my speech response.
I was able to edit apiai.py file to get the same by replacing

parameters = reg.get(‘parameters’)
with
parameters = req.get(‘contexts’, [{}])[0].get(‘parameters’)

this way i can get the parameters themselves plus the original term like (date.original) and (time.original)