(Could not construct ApplicationDefaultCredentials) for PHP dialogflow

use GoogleCloudStorageStorageClient; use GoogleCloudDialogflowV2EntityTypesClient; $storage = new StorageClient([ 'keyFile' => json_decode(file_get_contents(storage_path('app/public/tunepath-bot-tkpf-811257321355.json')), true) ]); $entityTypesClient = new EntityTypesClient(); $projectId = '[project_id]'; $entityTypeId = '[ENTITY_TYPE_ID]'; $formattedEntityTypeName = $entityTypesClient->entityTypeName($projectId, $entityTypeId); $entityType = $entityTypesClient->getEntityType($formattedEntityTypeName); foreach ($entityType->getEntities() as $entity) { print(PHP_EOL); printf('Entity value: %s' . PHP_EOL, $entity->getValue()); print('Synonyms: '); foreach ($entity->getSynonyms() as $synonym) { print($synonym . "t"); } print(PHP_EOL); } … Read more

While using a dialogflow mega-agent, according to a user setting I want to be able to query a specific sub agent at a time

While using a dialogflow mega-agent, according to a user setting I want to be able to query a specific sub agent at a time. I have 3 sub agents. Each subagent has similar training phrases but should request different data. The user should be able to select which sub agent they want to use and the query should only go to the selected subagent

Use Async Functions in DialogFlow WebHook

Referring to the solution posted here (DialogFlow V2 Webhook – Expects Speech responses Immediately and not after async requests)
What I want to achieve is that the web hook should wait until I get a response from my api call.
P.S: The API is working, its just that the bot doesn’t wait for the response to come.
Any help would be greatly appreciated. Thanks

Send parameters to webhook on dialogflow sdk v2

I’m trying to send some parameters to dialogflow (api.ai) such as username, email, etc but I couldn’t figure it out. The problem is I cannot get/set any specific data (such as username, email, etc.) with Dialogflow v2 Nodejs SDK. I tried to use queryParams.payload (v1: originalRequest) but It didn’t work somehow. Also, I tried to trigger custom event with data but I couldn’t get any event data on the response. Does someone know how to send some specific data for session talk on dialogFlow?

Dialogflow NodeJs Fulfillment V2 – webhook method call ends before completing callback

I am developing a Dialogflow webhook using dialogflow-fulfillment-nodejs client to find temperature for a city. While using the services to fetch the temperature for a city, everything works and the correct response is also generated but the response is not sent to the user even when the right method is called.