【问题标题】:Custom Payload in dialogflow is not responding对话流中的自定义有效负载没有响应
【发布时间】:2018-10-02 08:37:09
【问题描述】:

我在对话框流响应中为文本响应制作了简单的自定义负载

{
  "messages": [
    {
      "speech": "Text response",
      "type": 0
    }
  ]
} 

但它给了我回复Not available

这是我的原始 API 响应

{
  "id": "d5143e9a-e578-474f-bca4-fe993dd62649",
  "timestamp": "2018-10-02T08:30:54.035Z",
  "lang": "en",
  "result": {
    "source": "agent",
    "resolvedQuery": "what do you know about Data science",
    "action": "",
    "actionIncomplete": false,
    "parameters": {},
    "contexts": [],
    "metadata": {
      "intentId": "a1c71c95-3126-4076-81f7-ddf7a4da1bad",
      "webhookUsed": "false",
      "webhookForSlotFillingUsed": "false",
      "isFallbackIntent": "false",
      "intentName": "data1"
    },
    "fulfillment": {
      "speech": "",
      "messages": [
        {
          "type": 4,
          "payload": {
            "messages": [
              {
                "speech": "Text response",
                "type": 0
              }
            ]
          }
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 200,
    "errorType": "success"
  },
  "sessionId": "df6b3e49-d49b-4311-cb9f-2946febfcc8b"
}

这是截图 我无法理解这个问题..在此先感谢.................................................................. .....................................................

【问题讨论】:

  • 您使用的是哪种 Dialogflow 集成?您在哪里收到“不可用”错误?你在使用履行吗?是否定义了响应(在控制台中执行)?您是否确保为您的目标平台定义了响应?
  • 现在我在对话流中对此进行测试。(我想用 Skype 来实现)(有问题的屏幕截图)

标签: chatbot dialogflow-es


【解决方案1】:

您在fulfillment 之后缺少square brackets。尝试使用以粗体标记的括号。也不确定仅履行是否可以编写履行消息

"fulfillment": [{
      "speech": "",
      "messages": [
        {
          "type": 4,
          "payload": {
            "messages": [
              {
                "speech": "Text response",
                "type": 0
              }
            ]
          }
        }
      ]
    },
    "score": 1
  },
  "status": {
    "code": 200,
    "errorType": "success"
  },
  "sessionId": "df6b3e49-d49b-4311-cb9f-2946febfcc8b"
}]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多