Skip to content
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

Updated the way the openai key is ingested. #2

Merged

Conversation

richardwhiteii
Copy link

Refactor API key handling to use environment variable

Previously, the OpenAI API key was hardcoded in the code. This commit refactors the code to use an environment variable, OPENAI_API_KEY, to store the API key. This is a more secure and flexible way of handling the API key, allowing it to be easily changed without modifying the code. Additionally, if no API key is found, the code now raises an exception with a helpful error message, ensuring that the API key is set correctly. This change improves code quality and security.

@Raudaschl
Copy link
Owner

Looks great!

@Raudaschl Raudaschl merged commit d2c3261 into Raudaschl:master Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants