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

Allow users to set OPENAI_API_KEY in the app config #147

Open
kasnerz opened this issue Nov 6, 2024 · 3 comments
Open

Allow users to set OPENAI_API_KEY in the app config #147

kasnerz opened this issue Nov 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@kasnerz
Copy link
Collaborator

kasnerz commented Nov 6, 2024

Currently, we expect OPENAI_API_KEY to be set as environmental variable, which can be non-intuitive.

We can allow the users to set this key (and also other API keys) in the app configuration file, so that it can be set through the web interface or the YAML config file.

Are there any safety issues that we should think of? @oplatek

@kasnerz kasnerz added the enhancement New feature or request label Nov 6, 2024
@oplatek
Copy link
Member

oplatek commented Nov 6, 2024

We should not log the variable or the whole environment (even when raising some unexpected exception) otherwise we are fine.

And we should create the file with 600 permisions

@oplatek
Copy link
Member

oplatek commented Nov 13, 2024

I think it make sense to load the api_key from the Metric config as well

@kasnerz
Copy link
Collaborator Author

kasnerz commented Nov 13, 2024

But then you'll have to set the key every time you start a new campaign, which seems a bit inconvenient 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants