简体   繁体   English

对话流中的自定义有效负载没有响应

[英]Custom Payload in dialogflow is not responding

I have made s simple Custom payload for a text response in my Dialog flow response我在我的对话流响应中为文本响应制作了简单的自定义有效负载

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

But its giving me the response Not available但它给了我回应Not available

Here is my Raw Api response这是我的原始 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"
}

Here is Screenshot这是截图在此处输入图片说明 I am unable to understand this problem..Thanks in advance........................................................................................我无法理解这个问题......提前致谢...................................... …………………………………………………………………………………………………………………………………………………………

You are missing square brackets after fulfillment . fulfillment后您缺少square brackets Try using brackets as marked in bold.尝试使用以粗体标记的括号。 Also not sure if fulfillment alone will work write fulfillmentMessages也不确定单独的履行是否会起作用写fulfillmentMessages

"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"
}]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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