我正在将自定义翻译 API 与 POST 端点结合使用:https://api.cognitive.microsofttranslator.com/translate
经过混淆类别 ID 的完整查询网址为:https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&category=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-GENERAL&from=en&to =fr&includeSentenceLength=true
此查询在没有类别参数的情况下可以工作,但在包含类别参数时会失败并显示以下响应:
{
"error": {
"code": 400002,
"message": "The category parameter is invalid."
}
}
我已将订阅 key 添加到自定义翻译门户中。不确定为什么此请求失败。
最佳答案
原来我是个白痴。即使使用像我在本例中那样的简单字典,仍然必须使用该字典来训练和部署模型。
关于azure - 错误代码 400002 : The category parameter is invalid using Azure Custom Translation API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58000881/