-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Feat: Added Validation for Open AI API key #2412
Feat: Added Validation for Open AI API key #2412
Conversation
7eaa745
to
c1b39d4
Compare
Not sure if we want to add a platform specific validator. We try to keep all the validator as generic as possible. |
I'm against merging this in the current form. A possibility would be to have 'isAPIKey(string, provider)` where OpenAI would be one of the providers. |
@WikiRik Thank you for the feedback, I have not come across any method that open AI provides to validate the API key, I think we need to use the regex here. Also, we can make the method flexible by passing the provider, such as OpenAI, Gemini, Claude etc. |
isAPIKey would be a better option . But keeping up with a vendor specific key sure looks like a hassle |
I agree, no need for a platform specific validator. I wouldn't be comfortable too with something like |
not really. everything that exists out there are vendor determined which are likely to change frequently or not at all |
Thanks for your suggestion @Daniyal-Qureshi ; please feel free to pick any of our other issues including cleaning up some old PRs that just needed minor updates. See #2410 Welcome to the project! |
This PR aims to enhance the reliability and accuracy of the OpenAI key by validating the provided API Key.
Checklist