srcnalt/OpenAI-Unity

How to solve GPT-4 turbo (gpt-4-1106-preview) error

kwan3854 opened this issue · 4 comments

edit DataTypes.cs

    public struct CreateChatCompletionResponse : IResponse
    {
        public ApiError Error { get; set; }
        public string Model { get; set; }
        public string Id { get; set; }
        public string Object { get; set; }
        public long Created { get; set; }
        public List<ChatChoice> Choices { get; set; }
        public Usage Usage { get; set; }
        // Add these fields
        public string SystemFingerprint { get; set; }
    }

now you can use gpt-4-1106-preview model.

Thank you! This is very helpful.

Thank you for the advice, but I got a question that since the file DataType.cs is part of the Unity Package Cache. And any changes made will be lost. Does that mean each time we open Unity, we need to make this change?

Thank you for the advice, but I got a question that since the file DataType.cs is part of the Unity Package Cache. And any changes made will be lost. Does that mean each time we open Unity, we need to make this change?

Indeed, you're correct. Since DataType.cs is part of the Unity Package Cache, any modifications you make directly to the file in the cache could be overwritten. I have submitted a pull request with the necessary changes. It would be best to wait for the merge and subsequent update of the library before proceeding.

HOW TO EDIT DATATYPES.CS