У меня есть сервис на основе колб, размещенный в Heroku.Конечная точка которого задается как выполнение в диалоговом потоке.Теперь я не могу понять, как захватить полезную нагрузку запроса, которая запускается диалоговым потоком каждый раз, когда я запрашиваю что-то.
Я пытался захватывать и регистрировать то же самое в самой heroku, но это, похоже, не работает.
Сервисный код выглядит следующим образом:
@app.route('/date/currentdate/<date>', methods = ['POST'])
def postJsonHandler():
print (request.is_json)
content = request.get_json()
logging.warning(content)
return 'JSON posted'
JSON, который я получаю:
WARNING:root:{'responseId': 'c5115583-e9c5-497a-8a50-1ea07ab02dba-baaf0c1f', 'queryResult': {'queryText': 'send me the asap for 4568999', 'parameters': {'Dashboard': 'ASAP', 'number': 4568999.0}, 'allRequiredParamsPresent': True, 'fulfillmentMessages': [{'text': {'text': ['Hi I can definitely help you out with that.']}, 'platform': 'SKYPE'}, {'text': {'text': ['']}}], 'intent': {'name': 'replaced this', 'displayName': 'ASAP Dashboard'}, 'intentDetectionConfidence': 0.7012109, 'languageCode': 'en'}, 'originalDetectIntentRequest': {'payload': {}}, 'session': 'replaced this'}