OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API
https://www.nuget.org/packages/OpenAI/
Other
1.85k stars 428 forks source link

Error converting value "gpt-3.5-turbo-0613" to type 'OpenAI_API.Models.Model #183

Closed DmitryBorodiy closed 3 months ago

DmitryBorodiy commented 10 months ago

Error converting value "gpt-3.5-turbo-0613" to type 'OpenAI_API.Models.Model'. Path 'model', line 5, position 31. I have no idea how I can fix this exception.

OkGoDoIt commented 10 months ago

Hmm, can you give me some more context about where this is coming from? Also I just pushed a new version 1.8 with support for additional models, so maybe try that?

DmitryBorodiy commented 9 months ago

It's happens only when I build UWP app with .NET Native.

OkGoDoIt commented 9 months ago

Perhaps you're somehow using a different JSON deserializer? The Model type is strongly typed but it has an implicit conversion from a string, so when parsing a JSON reply from the API it should converted implicitly. It sounds like that might not be happening for some reason.

But I'm just guessing, perhaps you can give me a more detailed stack trace so I can understand where this is happening?

I'm actually not familiar with .net native and it's not a scenario I have tested, maybe you can give me some more details about your setup so I can try it myself.