Move keys to .env
Closed this issue · 1 comments
matthewdeanmartin commented
Right now the openai key is put in a json doc. A more failsafe pattern is to store it in a .env
file, .gitignore
it, and use the dotenv package or pipenv to load the value & then check os.environ["KEY"]
for the key. This is an extremely common pattern and there are many tutorials and tools specifically for this scenario.
When you accidentally check in your key, (or people who fork this do) you'll have to delete your key and regenerate new ones because git still shows keys in history.
mikavehns commented
Thank you so much for your suggestion. This is my first public GitHub repository and I'm still learning the ropes. I will make the necessary changes tomorrow. Thank you again for your help