You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The BatchResponse.Errors property is currently a List, but according to OpenAI it must be an object with an "object" and a "data" property containing the actual errors.
Your code piece
var batchRetrieveResult = await _openAIService.Batch.BatchRetrieve(batchId);
Result
An exception is thrown:
Exception thrown: 'System.Text.Json.JsonException' in System.Private.CoreLib.dll: 'The JSON value could not be converted to System.Collections.Generic.List`1[OpenAI.ObjectModels.ResponseModels.Error].'
at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.<DeserializeAsync>d__1.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.Json.HttpClientJsonExtensions.<<FromJsonAsyncCore>g__Core|12_0>d`2.MoveNext()
at OpenAI.Managers.OpenAIService.<BatchRetrieve>d__5.MoveNext()
at PromptBatchPushPollerWorker.<PollForBatchUpdates>d__9.MoveNext() in
Expected behavior
No exception is thrown.
The text was updated successfully, but these errors were encountered:
Describe the bug
The BatchResponse.Errors property is currently a List, but according to OpenAI it must be an object with an "object" and a "data" property containing the actual errors.
Your code piece
Result
An exception is thrown:
Expected behavior
No exception is thrown.
The text was updated successfully, but these errors were encountered: