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

fix: Hide LLM api key in generated code #137

Open
hughlv opened this issue Jul 15, 2024 · 0 comments
Open

fix: Hide LLM api key in generated code #137

hughlv opened this issue Jul 15, 2024 · 0 comments

Comments

@hughlv
Copy link
Collaborator

hughlv commented Jul 15, 2024

Theoratically it's fine to include the custom api-key in the generated code, however since it can be download can spread to other people. There is risk of api-key leakage.

config_list = [
    {"model": "gpt-4-1106-preview", "api_key": os.environ["OPENAI_API_KEY"]},
    {"model": "gpt-3.5-turbo", "api_key": os.environ["OPENAI_API_KEY"]},
]

This is the general solution that hides value of OPENAI_API_KEY, however it will make it impractical to add new api keys on UI, because we're not supposed to modify .env variables programatically.

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

No branches or pull requests

1 participant