Azure-Samples / Azure-Samples/cognitive-services-quickstart-code

The analyze request is invalid. Ensure that each filter key is not null, empty or longer than 128 and that the length of all keys is less than 1024 characters

Đang mở
#50 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
389
Fork
556
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

When running the analyze function using a list of keys to filter the data, I am getting the error below.

> "{\"error\":{\"code\":\"1010\",\"message\":\"The analyze request is invalid. Ensure that each filter key is not null, empty or longer than 128 and that the length of all keys is less than 1024 characters.\"}}"

```
AnalyzeResult result = await formClient.AnalyzeWithCustomModelAsync(modelId, fileStream, contentType: "application/pdf", GetKeyListByProvince(province));

private IList GetKeyListByProvince(Province province)
{
var keys = new List();
switch (province)
{
default:
case Province.BC:
keys = new List{
"Name of Company:", "Incorporation Number:", "Business Number:", "Last Name, First Name, Middle Name:", "Jurisdiction:", "Delivery Address:", "Entity Status:"
};
break;
}
return keys;
}
```

It works fine when analyzing the data without the list of keys, but we need to narrow it down to only the ones required.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the AnalyzeWithCustomModelAsync call and the GetKeyListByProvince key list shown in the report. Compare the supplied keys with the service's documented filter-key constraints and determine whether the request can succeed with these filters; no source file or test is named, so a complete fix or documented limitation would establish what is done.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, csharp
Lĩnh vực
api, cloud
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.