-
-
Notifications
You must be signed in to change notification settings - Fork 172
Description
Hey @srcnalt , I'm seeing this issue in v0.1.12 with Unity 2022.2.16 running WebGL builds. Here is the JSON returned by OpenAI Chat Completion:
{"id":"chatcmpl-7Blu4ha7YR834teg22T0XYBdBk77D","object":"chat.completion","created":1683040104,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":70,"completion_tokens":58,"total_tokens":128},"choices":[{"message":{"role":"assistant","content":"Hello, it is a pleasure to be chatting with you today.\n\nI am feeling quite content at the moment, thank you for asking. How about yourself?\n\nDo you have any questions for me? I am happy to share my thoughts and insights on science, philosophy, and life in general."},"finish_reason":"stop","index":0}]}
But the library is throwing this error via Newtonsoft:
app.framework.js.br:10 JsonSerializationException: Could not find member 'id' on object of type 'CreateChatCompletionResponse'. Path 'id', line 1, position 6.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <00000000000000000000000000000000>:0
--- End of stack trace from previous location where exception was thrown ---
Anything else I should adjust to get this to work?