IBM Watson Assistant:如何解决web_action错误“内部错误:无法检索内容类型." [英] IBM Watson Assistant: How to solve web_action error "Internal error: Content-type can not be retrieved."

查看:53
本文介绍了IBM Watson Assistant:如何解决web_action错误“内部错误:无法检索内容类型."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将IBM Cloud Functions与Watson Assistant对话框连接为web_action.因此,我在watson对话框json编辑器中指定了web_action如下.

I'm trying to connect IBM Cloud Functions with a Watson Assistant dialog as web_action. So I have specified web_action as following in watson dialog json editor.

"actions": [
    {
      "name": "rajesh@heltha.co_dev/default/callKinvey",
      "type": "web_action",
      "parameters": {
      },
      "credentials": "$private.mycredential",
      "result_variable": "context.my_input_returned"
    }
  ]

现在,问题出在测试助手出现以下错误

Now, the issue is while testing assistant I'm getting following error

内部错误:无法检索内容类型.(日志中还有1个错误)

以下是我在IBM云上创建的功能,该功能已启用 Web Action :

Following is my function that is created on IBM-cloud and enabled for Web Action:

/**
  *
  * main() will be run when you invoke this action
  *
  * @param Cloud Functions actions accept a single parameter, which must be a JSON object.
  *
  * @return The output of this action, which must be a JSON object.
  *
  */
function main(params) {
    return { message: 'Hello World' };
}

我函数的CURL是:

curl -u API-KEY -X POST https://us-south.functions.cloud.ibm.com/api/v1/namespaces/rajesh@heltha.co_dev/actions/callKinvey?blocking=true

推荐答案

解决此类错误的最简单方法是将 .json 附加到端点.

The easiest way to solve this type of error is to append .json to your endpoint.

这篇关于IBM Watson Assistant:如何解决web_action错误“内部错误:无法检索内容类型."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆