srcnalt / OpenAI-Unity

An unofficial OpenAI Unity Package that aims to help you use OpenAI API directly in Unity Game engine.
MIT License
648 stars 144 forks source link

JsonSerializationException: Could not find member 'warning' on object of type 'CreateChatCompletionResponse'. Path 'warning', line 2, position 12. #73

Closed nihatcagri closed 1 year ago

nihatcagri commented 1 year ago

I was able to use the API without any issues until yesterday, but today I started getting this error without making any updates. I saw "Could not find member id" errors in previous posts, but I didn't see the "warning" message. I'm waiting for your assistance, thank you :)

stavrosdidakis commented 1 year ago

Same here

CampbellJohn commented 1 year ago

The model this library is using depreciated. It's giving a "warning" message in the json, but that's not a field we're expecting so it's throwing an error.

Here's the message OpenAI attached;

"warning": "This model version is deprecated and a newer version 'gpt-3.5-turbo-0613' is available. Migrate before September 13 to avoid disruption of service. Learn more https://platform.openai.com/docs/deprecations"

I changed the model version in ChatGPT.cs, and it's working for me again.

gugeme commented 1 year ago

it works.thanks!

nihatcagri commented 1 year ago

Thank you, worked ! 👍