【问题标题】:IBM Watson Assistant: How to solve web_action error "Internal error: Content-type can not be retrieved."IBM Watson Assistant:如何解决 web_action 错误“内部错误:无法检索内容类型。”
【发布时间】:2019-08-29 12:08:47
【问题描述】:

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

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

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

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

以下是我在 IBM-cloud 上创建并为 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

【问题讨论】:

标签: ibm-cloud ibm-watson watson-assistant ibm-cloud-functions


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2021-10-01
    • 1970-01-01
    • 2017-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 2019-02-18
    相关资源
    最近更新 更多