Skip to content
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

ERROR IN VALIDATING VALID OPEN AI KEY #1

Open
OculusQuestVR opened this issue Nov 20, 2023 · 3 comments
Open

ERROR IN VALIDATING VALID OPEN AI KEY #1

OculusQuestVR opened this issue Nov 20, 2023 · 3 comments

Comments

@OculusQuestVR
Copy link

Good morning Seth, I'm Mauro from Rome. First of all, I wanted to compliment you on your projects; truly remarkable and innovative. I was trying your interesting GPT Avatar project, but even after inserting a valid key in the appropriate field (between open and closed parentheses) and saving the file as config.txt, I'm encountering the following error:

{
"error": {
"message": "Incorrect API key provided: \u******-***********************************************mi\u003e. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}

Would you be so kind as to suggest a solution so I can test your project? P.S: The key is valid and has access to the GPT 3.5 Chat API. Warm regards and congratulations again on your work. Mauro from Rome.

@SethRobinson
Copy link
Owner

Huh, I just ran it on my system and it worked (with the same key) with its config.txt file set to:

set_openai_model|gpt-3.5-turbo
or
set_openai_model|gpt-4
or
set_openai_model|gpt-4-1106-preview

So not sure what's wrong. Try gpt-4?

If it's an older key I'd try generating a new one, there is some weirdness with legacy systems needing a different endpoint, but I think that only applies to gpt-3.5-turbo-instruct, etc.

@OculusQuestVR
Copy link
Author

OculusQuestVR commented Nov 22, 2023 via email

@SethRobinson
Copy link
Owner

Sure, here is how my (redacted) key is set in the config.txt file:

#required, set your openAI API key
set_openai_api_key|sk-jUj5ss8zbi1412896307346278034623786RhfFqavU

BTW, running it directly from Unity will cause it to write .txt files of the actual request (not just the error) to OpenAI which might be useful for debugging what's wrong, might see a weird extra space or invisible character at the end or something. I believe you can put an ending | to make sure there isn't a rogue CR or linefeed being added by your editor (windows vs linux type editing thing?)

Good luck with your VR apps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants