chat gpt API problemin unity 2022. Authentication failed #124
Closed
chiarapassa1
started this conversation in
General
Replies: 1 comment
-
fixed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, even if i did the folder in the right place with the json file containing the organization and the key, I get errors and chatgpt wont works in unity. Thanks in advance for any help.
Chiara
API Key is null and auth.json does not exist. Please check https://github.com/srcnalt/OpenAI-Unity#saving-your-credentials
UnityEngine.Debug:LogError (object)
OpenAI.Configuration:.ctor (string,string) (at ./Library/PackageCache/com.srcnalt.openai-unity@f7f501c076/Runtime/Configuration.cs:37)
OpenAI.OpenAIApi:get_Configuration () (at ./Library/PackageCache/com.srcnalt.openai-unity@f7f501c076/Runtime/OpenAIApi.cs:31)
OpenAI.OpenAIApi/d__6
1<OpenAI.CreateChatCompletionResponse>:MoveNext () (at ./Library/PackageCache/com.srcnalt.openai-unity@f7f501c076/Runtime/OpenAIApi.cs:75) System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1<OpenAI.CreateChatCompletionResponse>:Start<OpenAI.OpenAIApi/d__61<OpenAI.CreateChatCompletionResponse>> (OpenAI.OpenAIApi/<DispatchRequest>d__6
1<OpenAI.CreateChatCompletionResponse>&)OpenAI.OpenAIApi:DispatchRequest<OpenAI.CreateChatCompletionResponse> (string,string,byte[])
OpenAI.OpenAIApi/d__12:MoveNext () (at ./Library/PackageCache/com.srcnalt.openai-unity@f7f501c076/Runtime/OpenAIApi.cs:230)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<OpenAI.CreateChatCompletionResponse>:Start<OpenAI.OpenAIApi/d__12> (OpenAI.OpenAIApi/d__12&)
OpenAI.OpenAIApi:CreateChatCompletion (OpenAI.CreateChatCompletionRequest)
OpenAI.ChatGPT/d__11:MoveNext () (at Assets/Samples/OpenAI Unity/0.2.0/ChatGPT/ChatGPT.cs:59)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<OpenAI.ChatGPT/d__11> (OpenAI.ChatGPT/d__11&)
OpenAI.ChatGPT:SendReply ()
UnityEngine.EventSystems.EventSystem:Update () (at ./Library/PackageCache/[email protected]/Runtime/EventSystem/EventSystem.cs:530)
Error Message: You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.
Error Type: invalid_request_error
UnityEngine.Debug:LogError (object)
OpenAI.OpenAIApi/d__6`1<OpenAI.CreateChatCompletionResponse>:MoveNext () (at ./Library/PackageCache/com.srcnalt.openai-unity@f7f501c076/Runtime/OpenAIApi.cs:87)
UnityEngine.UnitySynchronizationContext:ExecuteTasks ()
Beta Was this translation helpful? Give feedback.
All reactions