-
-
Couldn't load subscription status.
- Fork 85
Description
hello
The default JsonSerializationOptions in OpenAIClient is defined as internal. So it's not possible to DeserializeObject correctly in some case (example: content="\n") return null for content.
I have modified the ContractResolver by DefaultContractResolver and it works.
internal static JsonSerializerSettings JsonSerializationOptions { get; } = new JsonSerializerSettings
{
.......
ContractResolver = new DefaultContractResolver() //TBN EmptyToNullStringContractResolver()
};
That would be better if we could change the JsonSerializationOptions from the OpenAIClient (or I didn't find how to?)
Additional context
Thanks for this awesome package. I'm so impressed by the code quality and documentation. Bravo!