Dialogflow Webhooks:webhookStatus 代码 14 是什么意思?
Dialogflow Webhooks: What is a webhookStatus code 14 mean?
我的 Dialogflow 项目没有进行正确的 webhook 调用。我 运行 在命令提示符下测试时给你的 curl 命令。
curl -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer ya29.c.Ko8BvQcQFJJgEzKprtZn9kWStTWE5trMyYN8_oilT_4LInyASeCGiBcrrSepTvrjomVCZKSaFF_RaCYoC_yBU0LWM8ODzRlliAHQv1C97veQuxNjq_aeWLEN361drz6Rk_WEn7hl52DRN32ee4xmV97rW8nqBVFsbPykXdkjj83iKWjwKv9FKVhNJNOfMaejMH4" -d "{\"queryInput\":{\"text\":{\"text\":\"run\",\"languageCode\":\"en\"}},\"queryParams\":{\"timeZone\":\"America/New_York\"}}" "https://dialogflow.googleapis.com/v2/projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb:detectIntent"
我得到的回复是:
{
"responseId": "5eea8256-8771-4db1-8b51-2c82e31c7bf4-2e39b744",
"queryResult": {
"queryText": "run",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentText": "Error: Speed test has not been called properly",
"fulfillmentMessages": [
{
"text": {
"text": [
"Error: Speed test has not been called properly"
]
}
}
],
"outputContexts": [
{
"name": "projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb/contexts/location",
"lifespanCount": 5
},
{
"name": "projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb/contexts/weathercontext-followup",
"lifespanCount": 2
}
],
"intent": {
"name": "projects/weathersample-ifjqjr/agent/intents/98199125-8fc6-466f-98b6-7648e14b06e7",
"displayName": "runSpeedTest"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {
"webhook_latency_ms": 2439
},
"languageCode": "en"
},
"webhookStatus": {
"code": 14,
"message": "Webhook call failed. Error: UNAVAILABLE."
}
在此响应的底部有一个 "webhookStatus" 对象,错误不可用且代码为 14。有人知道该代码的含义吗?
Webhook 基本上是 HTTP 回调,当启用 web-hook 的意图匹配时将被触发。 Code:14 UNAVAILABLE 意味着它正在寻找映射到 "runSpeedTest" 意图的处理函数,该函数不存在于提供的网络挂钩中。在外部部署之前,您可以在 Fulfilment->Inline Editor 中对其进行测试。
我的 Dialogflow 项目没有进行正确的 webhook 调用。我 运行 在命令提示符下测试时给你的 curl 命令。
curl -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer ya29.c.Ko8BvQcQFJJgEzKprtZn9kWStTWE5trMyYN8_oilT_4LInyASeCGiBcrrSepTvrjomVCZKSaFF_RaCYoC_yBU0LWM8ODzRlliAHQv1C97veQuxNjq_aeWLEN361drz6Rk_WEn7hl52DRN32ee4xmV97rW8nqBVFsbPykXdkjj83iKWjwKv9FKVhNJNOfMaejMH4" -d "{\"queryInput\":{\"text\":{\"text\":\"run\",\"languageCode\":\"en\"}},\"queryParams\":{\"timeZone\":\"America/New_York\"}}" "https://dialogflow.googleapis.com/v2/projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb:detectIntent"
我得到的回复是:
{
"responseId": "5eea8256-8771-4db1-8b51-2c82e31c7bf4-2e39b744",
"queryResult": {
"queryText": "run",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentText": "Error: Speed test has not been called properly",
"fulfillmentMessages": [
{
"text": {
"text": [
"Error: Speed test has not been called properly"
]
}
}
],
"outputContexts": [
{
"name": "projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb/contexts/location",
"lifespanCount": 5
},
{
"name": "projects/weathersample-ifjqjr/agent/sessions/ed2ec645-d8da-55b7-f71e-d0ee8d7ff2bb/contexts/weathercontext-followup",
"lifespanCount": 2
}
],
"intent": {
"name": "projects/weathersample-ifjqjr/agent/intents/98199125-8fc6-466f-98b6-7648e14b06e7",
"displayName": "runSpeedTest"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {
"webhook_latency_ms": 2439
},
"languageCode": "en"
},
"webhookStatus": {
"code": 14,
"message": "Webhook call failed. Error: UNAVAILABLE."
}
在此响应的底部有一个 "webhookStatus" 对象,错误不可用且代码为 14。有人知道该代码的含义吗?
Webhook 基本上是 HTTP 回调,当启用 web-hook 的意图匹配时将被触发。 Code:14 UNAVAILABLE 意味着它正在寻找映射到 "runSpeedTest" 意图的处理函数,该函数不存在于提供的网络挂钩中。在外部部署之前,您可以在 Fulfilment->Inline Editor 中对其进行测试。