简体   繁体   中英

Dialogflow Crash in AWS Deployment

I deployed the same source code to AWS EC2 Linux instance, but it fails to display the response Text from dialogflow. I checked the conversation history in Dialogflow console, it shows both request and response correctly. However, the dialogflow client(PHP) seems crashes after calling the function "detectIntent". Unfortunately, got no way to find any logs.

Reinstalled Dialogflow Client Library

  $formattedSession = $sessionsClient->sessionName($agent, $agentSession->session_id);
  // Set Text Input
  $textInput  = new TextInput();
  $textInput->setText($text);
  $textInput->setLanguageCode($lang);

  // Set Parameters
  $optionalArgs = array();

  $queryInput = new QueryInput();
  $queryInput->setText($textInput);

  $response = $sessionsClient->detectIntent($formattedSession, $queryInput, $optionalArgs);

  $action = $response->getQueryResult()->getAction(); //The action name from the matched intent.

Hope the following experience helps others: For my case, the php version is not compatible with one of the Google API library. Hence it crashes somewhere we cannot capture. Solution: Uninstall PHP, and Install the compatible version of php.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM