There is no way to currently generate the old-style “sk” key. Even in the default project, it generates “sk-proj” keys. If you really need an “sk” key, you can do some back-end tricks, but it is not sustainable.
Here is an idea:
Generate an “sk-proj”. Then, create a hash table to create a new key in your back-end with prefered “sk-” key format (maybe get the “proj” part out).
Then, when you or others call the API key from the environment, write a directing function to the hash table to call ‘sk-proj’ from the back end with the ‘sk-’ key. Does it make sense?
It is a cumbersome process, though. I would prefer to use ‘sk-proj’ directly.
Thanks for your quick response!
To help you better understand my issue, here is the GitHub link to my BlenderGPT add-on repository: (https://github.com/gd3kr/BlenderGPT)
The add-on strictly requires API keys starting only with “sk-” , not with “sk-proj-” or other prefixes. If there’s any workaround or update that can support this, please let me know.
That old code is going to have a lot more problems then just attempting to incorrectly validate keys. It has way obsolete openai library 0.27.2 included, and neither code to interact with the sdk or the sdk itself is going to perform for you.
GPT-4 in this addon can ONLY be obtained through the OpenAI waitlist
If you are not in a position to rewrite the whole thing, you must abandon the idea.
@_j is most likely right. Your time is better spend on searching and evaluating other options.
Using Deep Research is actually a good time saving starting point for such a scenario.