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

change api key #5

Closed
kisslessvirgin opened this issue Feb 8, 2023 · 7 comments
Closed

change api key #5

kisslessvirgin opened this issue Feb 8, 2023 · 7 comments

Comments

@kisslessvirgin
Copy link

How do I change the API key? I accidentally entered it wrong and I can't seem to even reset it.
I've tried:
deleting sgpt.py in ~/.local/lib/python3.11/site-packages and /usr/local/bin
I know there's supposed to be a text file somewhere but I cant find it.
Any help appreciated!

@TheR1D
Copy link
Owner

TheR1D commented Feb 8, 2023

Hi, install it again:

pip install shell-gpt --user --upgrade

Then you would need to delete your API key txt file:

rm ~/.config/shell-gpt/api_key.txt

And try to run sgpt again:

sgpt "test"

It will ask your API key.

Olshansk added a commit to Olshansk/shell_gpt that referenced this issue Feb 19, 2023
Copying the solution provided in TheR1D#5 directly in the main README.
@kid-gorgeous
Copy link

Ran into this problem last week during installation, solved it right away!

@wfc0909
Copy link

wfc0909 commented Feb 21, 2023

This thread solved the same case and I am finding this ai tool may help a lot in coding. Thank you.

@xsoc
Copy link

xsoc commented Apr 2, 2023

Looks like the file has changed now, I found my key in
~/.config/shell_gpt/.sgptrc
Just nano it, and update the OPENAI_API_KEY= as appropriate

@woejefe
Copy link

woejefe commented Apr 24, 2023

what is the command on windows... where is the directory. does it go into python or pip folder?

@xsoc
Copy link

xsoc commented Apr 25, 2023

On windows try notepad %USERPROFILE%\.config\shell_gpt\.sgptrc

@m4l490n
Copy link

m4l490n commented Dec 14, 2023

I'm having this issue too but there is no ~/.config/shell-gpt/api_key.txt and I can't seem to be able to completely purge sgpt in order to install it again.

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

7 participants