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

Set api key on Windows #216

Open
corzel opened this issue May 3, 2024 · 3 comments
Open

Set api key on Windows #216

corzel opened this issue May 3, 2024 · 3 comments

Comments

@corzel
Copy link

corzel commented May 3, 2024

Hi guys!

Is there a way to set the API key without using the 'export' command because on Windows it doesn't work.

Regards!

@ysolanky
Copy link
Contributor

ysolanky commented May 3, 2024

@corzel on windows if you are using Powershell, checkout the docs here to export an environment variable
Basically, $Env:API_KEY = "api_key"

You could also use set, setx or add the environmental variable permanently in the settings.

@Photize
Copy link

Photize commented May 19, 2024

If power shell doesn't work
On Windows:

Use the search bar in the Start menu to find “Edit the system environment variables”.

Click “Environment variables”

Use the upper “New…” button to add a User variable

Create a new variable called OPENAI_API_KEY and set the value to the secret key you got from your account settings on openai.com

@Photize
Copy link

Photize commented May 19, 2024

Or of course GROQ_API_KEY 😉

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

3 participants