I'm using the Dialogflow PHP library to work with the Dialogflow API. The detect intent API request returns a complex Google\Protobuf\Struct object for the parameters. Is there an easy way to retrieve the extracted parameters returned in the Detect Intent response?
Here is the part of the code:
$response = $sessionsClient->detectIntent($session, $queryInput);
$queryResult = $response->getQueryResult();
$parameters = $queryResult->getParameters(); // ==> Returns Google\Protobuf\Struct object
These are the parameters returned as seen in the Dialogflow history tab:
"parameters": {
"integer": "",
"number": "",
"currency": "{amount=400000, currency=USD}"
}
I would like retrieve the parameters in the same format(or array is fine).