[Enhancement] Add API key validation
Problem Users seem to have a hard time with OpenAI API keys working, improperly inputting API keys, or obtaining the proper subscription.
Suggested Solution(s) The following would provide more clear instruction and error handling to make API keys more intuitive.
- [ ] Add more clear instructions for setting up the OpenAI API key and obtaining the payment/subscription requirements.
- [ ] Modify the setup.sh process to include regex key validation. Example: ^sk-[a-zA-Z0-9]{40}$
- [ ] Add field validation to the settings menu
- [x] Add key validation by doing a test call after the key is provided
I can work on this tonight. @yourepicservices do you know if the open API key uses a standard I can reference for the validation?
Awesome! I think that Regex might do the trick
Updated error message based on actually calling the API last night so at least that's out of the way already
@asim-shrestha,
I covered these two here
- Modify the setup.sh process to include regex key validation.
- Add field validation to the settings menu
Nice! Just Add more clear instructions for setting up the OpenAI API key and obtaining the payment/subscription requirements. left then