【发布时间】: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