我正在尝试将Webapp中的回复发送回dialogflow,但出现以下错误
“ Webhook调用失败。错误:无法解析webhook JSON响应: 找不到字段:消息中的ETag google.cloud.dialogflow.v2beta1.WebhookResponse。“
这是我的代码
public class HomeController : Controller
{
[HttpPost]
public string Index(GoogleCloudDialogflowV2WebhookRequest obj)
{
var response = new GoogleCloudDialogflowV2WebhookResponse();
response.FulfillmentText = "Hello world";
var output = JsonConvert.SerializeObject(response);
return output; ;
}
}
这是我返回的json
{
"followupEventInput":null,
"fulfillmentMessages":null,
"fulfillmentText":"lee",
"outputContexts":null,
"payload":null,
"source":null,
"ETag":null
}
有什么想法吗?我正在使用
Google.Apis.Dialogflow.v2.Data;