[BUG] Exception retrieving examples from LUIS with Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.LUISAuthoringClient
See original GitHub issueDescription Hi, Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.LUISAuthoringClient.Examples.ListAsync fails when try to retrieve data
Expected behavior should retrieve the list of examples
Actual behavior (include Exception or Stack Trace) When I try to get the list of LUIS examples, it throws an exception wher indicates that the id it tries to return is greater than int32, when checking the LabeledUtterance and LabelExampleResponse class I see that the id is indeed an int32? on the image can see that try ot cast 5259086643 as Int32 and throws the exception
System.AggregateException
HResult=0x80131500
Mensaje = One or more errors occurred. (Unable to deserialize the response.)
Origen = System.Private.CoreLib
Seguimiento de la pila:
en System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) en System.Threading.Tasks.Task
1.get_Result()
en LuisConsole.Program.Main(String[] args) en C:\Users\ddurano\source\repos\ConsoleApp2\LuisConsole\Program.cs: línea 30
Esta excepción se generó originalmente en esta pila de llamadas: [Código externo]
Excepción interna 1: SerializationException: Unable to deserialize the response.
Excepción interna 2: JsonReaderException: JSON integer 5259086643 is too large or small for an Int32. Path ‘[0].id’, line 1, position 17.
What is the actual behavior?
To Reproduce
Environment:
- Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring [3.1.0]
- Windows 10 [.NET 5.0]
- IDE and version : [Microsoft Visual Studio Community 2022 Preview ]
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
Hi @asturm0 i dont know the exactly command i used but i was able to build it Ehen running Autorest in legacy Mode so it uses c# Client 2 instead of 3. I have an fork of the SDK too with the updated Client. https://github.com/SamhammerAG/azure-sdk-for-net/commit/718cce652600c455599ba9c73e3ebbbc48325fca Hope that helps you. I was able to build a nuget package from this one and used that until we geht a fix.
I have the issue with integer overflow in LabelUtterance too on a production system.
I tried also with latest preview version 3.2.0-preview4, but it only has fix for LabelExampleResponse which fixes adding. see https://github.com/Azure/azure-sdk-for-net/issues/18041#issuecomment-765668823
But i really need a fix for the get api to receive the LabelUtterance. I found there was a PR to fix it, but there was no reaction on it and was closed. see https://github.com/Azure/azure-sdk-for-net/pull/24456 @MahmoudYounes @cahann Can you maybe have a look at that?
Stacktrace: