-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonSerializationException: No JSON content found and type 'OpenAI.CreateAudioResponse' is not nullable. Path '', line 0, position 0. #119
Comments
Hi @Exiro001, the received response is not a JSON, so it might me a message about quota limit or something else. You can print out the response before it gets parsed and see what the error says. |
I've encountered the same error but I haven't reached my quota limit. I just bought 5$ worth of tokens / quota. The error I see in VR is: JsonSerializationException: No JSON Content found and type 'OpenAI.CreateAudioResponse' is not nullable. Path '', line 0, position 0 It works in the editor but doesn't work in VR. Since the API key is being read from auth.json, I manually placed the API key inside the script instead inside the = new OpenAI("apikey", "orgkey");. To my surprise, I still receive the same error. |
I have had the same issue, after adding the API/Organization key had the same issue still, what solved it for me is going to: build settings -> player settings -> publishing settings, then enable Custom Main Manifest. Go to the manifest file and add the following line: |
@JensDijkgraaf we have the same issue... what is the line you have added to the manifest? |
@tobivr my bad, the line you need to add is:
as can be seen in the line this is specifically for android, but i can imagine there would be a similar but slightly different solution for iOS, hope it helps! |
I added in what you said @JensDijkgraaf, however, I am still receiving the same issue. Any other ideas perhaps? |
JsonSerializationException: No JSON content found and type 'OpenAI.CreateAudioResponse' is not nullable. Path '', line 0, position 0.
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) (at <761cf2a144514d2291a678c334d49e9b>:0)
Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at <761cf2a144514d2291a678c334d49e9b>:0)
Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at <761cf2a144514d2291a678c334d49e9b>:0)
Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) (at <761cf2a144514d2291a678c334d49e9b>:0)
Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) (at <761cf2a144514d2291a678c334d49e9b>:0)
OpenAI.OpenAIApi.DispatchRequest[T] (System.String path, System.Collections.Generic.List`1[T] form) (at C:/Users/LENOVO ONE/Downloads/OpenAI-Unity-0.2.0/OpenAI-Unity-0.2.0/Runtime/OpenAIApi.cs:176)
OpenAI.OpenAIApi.CreateAudioTranscription (OpenAI.CreateAudioTranscriptionsRequest request) (at C:/Users/LENOVO ONE/Downloads/OpenAI-Unity-0.2.0/OpenAI-Unity-0.2.0/Runtime/OpenAIApi.cs:336)
Samples.Whisper.Whisper.EndRecording () (at Assets/Samples/OpenAI Unity/0.2.0/Whisper/Whisper.cs:73)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at <27124aa0e30a41659b903b822b959bc7>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext.Exec () (at :0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at :0)
this all occurred in all samples provided
The text was updated successfully, but these errors were encountered: