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 'logprobs' on object of type 'ChatChoice'. Path 'choices[0].logprobs', line 13, position 17. #108

Closed MrKamikazee closed 7 months ago

MrKamikazee commented 7 months ago

I don't know what happen, but yesterady this work, and today not.

Steps to reproduce the behavior:

  1. Play the project
  2. Send some message
  3. Wait for the error

image

mhhk88 commented 7 months ago

The same thing happened to me. It was Ok until yesterday. I am curious about the chatGPT API version that is currently used without problems.

tunyawat commented 7 months ago
Modify the DataTypes.cs as follow

public struct ChatChoice
{
    public ChatMessage Message { get; set; }
    public ChatMessage Delta { get; set; }
    public int? Index { get; set; }
    public string FinishReason { get; set; }
    public bool logprobs {get; set; }
}
MrKamikazee commented 7 months ago

It works, thanks!!!