所以我在Azure上创建了自定义多标签模型并进行了部署。现在我一直在努力按照指示去做请求。提交的cURL可以很好地处理202,但检索它的cURL返回的是:{"error":{"code":"404","message": "Resource not found"}}
。这是没有一些私人信息的请求:提交:
curl -X POST "<endpoint>/language/analyze-text/jobs?api-version=<version>" -H "Ocp-Apim-Subscription-Key: key" -H "Content-Type: application/json" -d "{"tasks":[{"kind":"CustomMultiLabelClassification","parameters":{"projectName":"prjName","deploymentName":"model"}}],"displayName":"CustomTextPortal_CustomMultiLabelClassification","analysisInput":{"documents":[{"id":"document_CustomMultiLabelClassification","text":"Hello world!","language":"en"}]}}"
检索:
curl <endpoint>/language/analyze-text/jobs?api-version=<version> -H "Ocp-Apim-Subscription-Key: key"
它只是被窃听或只是不再工作或我做错了什么?
缺少-X GET方法和URL中的作业ID。正确的格式应该是:
curl -X GET "<endpoint>/language/analyze-text/jobs/{jobId}?api-version=<version>" -H "Ocp-Apim-Subscription-Key: key"