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

Make it possible to load api keys from a separate file #678

Closed
einarpersson opened this issue Jul 2, 2024 · 0 comments · Fixed by #685
Closed

Make it possible to load api keys from a separate file #678

einarpersson opened this issue Jul 2, 2024 · 0 comments · Fixed by #685
Labels
enhancement New feature or request

Comments

@einarpersson
Copy link

Is your feature request related to a problem? Please describe.
I want to put my aichat/config.yaml in my dotfiles git repo, and hence I want to get rid of the api keys from that particular file. I saw that there is an alternative which is to specify the keys as environment variables OPENAI_API_KEY CLAUDE_API_KEY etc. But sourcing (eg. in .zshenv) will make them visible to all subprocesses and be outputted in any dump of env variables, making them prone to leaking as of my understanding. Also the naming is very general, I will probably use OpenAi api keys in other contexts.

Describe the solution you'd like
Perhaps a AICHAT_API_KEYS_FILE env variable or something like that, with a sensible default (sibling to the config.yaml file), so that the application itself can read from the file directly.

If not, at least the names of the api keys should be prefixed with AICHAT, shouldn't them?

Additional context
It may be that I lack understanding on this topic, I just want to do things the right way :)

@einarpersson einarpersson added the enhancement New feature or request label Jul 2, 2024
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

Successfully merging a pull request may close this issue.

1 participant