Open AlenDK opened 1 year ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @assafi.
seems like the bug is still present
but is probably server side, since I can reproduce it also in python
We're also having the same issue with the AnalyzeSentimentAsync and AnalyzeSentimentBatchAsync methods on the latest SDK (same version as op).
Library name and version
Azure.Ai.TextAnalytics 5.3.0
Describe the bug
From the Data limitation page it states ( https://learn.microsoft.com/en-us/azure/ai-services/language-service/concepts/data-limits):
Feature | Value -- | -- Text Analytics for health | 125,000 characters as measured by StringInfo.LengthInTextElements. All other preconfigured features (synchronous) | 5,120 as measured by StringInfo.LengthInTextElements. If you need to submit larger documents, consider using the feature asynchronously. All other preconfigured features (asynchronous) | 125,000 characters across all submitted documents, as measured by StringInfo.LengthInTextElements (maximum of 25 documents).Using the async method(such as RecognizeEntitiesAsync) seems to also be limited to 5,120 characters.
Expected behavior
Able to process a text that is over 5120 characters and less than 12500
Actual behavior
Error message:
System.Private.CoreLib: Exception while executing function: XXX. Azure.AI.TextAnalytics: A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits
Content: {"kind":"EntityRecognitionResults","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Document in request.","innererror":{"code":"InvalidDocument","message":"A document within the request was too large to be processed. Limit document size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}}
Reproduction Steps
Create a text that is over 5120 characters long:
string pattern = "test "; int repeatTimes = 7000 / pattern.Length; string longString = string.Concat(Enumerable.Repeat(pattern, repeatTimes));
var test = await client.RecognizeEntitiesAsync(longString);
Environment
No response