Implement API key reset option
Implement an option to reset an API key using command line argument --reset-key. When user provides this flag delete file located in ~/.config/shell-gpt/api_key.txt and ask for new API key. Additionally impement API key validation. Since OpenAI doesn't have dedicated endpoint just for key validation, call https://api.openai.com/v1/completions with some test prompt, make sure response status code is not 403, if so, ask user for valid API key.
Hey I messed up and I pasted my API key twice, do you need help with this feature
@highonweb solution for now: https://github.com/TheR1D/shell_gpt/issues/5
Thanks bro. Got it
I've been working on a PR with this that I'll try to make a PR for within the next week.
@highonweb solution for now: #5
That doesn't work. There is no .config/shell-gpt/api_key.txt and reinstalling doesn't work for having shell-gpt ask for the key again. I can't make it ask for the key again.