【问题标题】:Dialogflow Crash in AWS DeploymentAWS 部署中的 Dialogflow 崩溃
【发布时间】:2020-03-08 09:58:36
【问题描述】:

我将相同的源代码部署到 AWS EC2 Linux 实例,但它无法显示来自对话流的响应文本。 我在 Dialogflow 控制台中检查了对话历史记录,它正确显示了请求和响应。但是,在调用函数“detectIntent”后,对话流客户端(PHP)似乎崩溃了。 不幸的是,没有办法找到任何日志。

重新安装 Dialogflow 客户端库

  $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.

【问题讨论】:

    标签: php amazon-web-services deployment dialogflow-es


    【解决方案1】:

    希望以下经验对其他人有所帮助: 就我而言,php 版本与 Google API 库之一不兼容。因此它在我们无法捕获的地方崩溃。 解决方法:卸载PHP,安装兼容版本的php。

    【讨论】:

      猜你喜欢
      • 2022-01-01
      • 2015-07-10
      • 2012-10-02
      • 1970-01-01
      • 1970-01-01
      • 2018-03-09
      • 1970-01-01
      • 2022-01-20
      • 1970-01-01
      相关资源
      最近更新 更多