EdgeGPT
EdgeGPT copied to clipboard
Can i store cookie with environment variable instead of cookie.json?
i try to run it on replit and store the cookie in json, It doesn't seem safe Is there any other way to login?
It doesn't seem safe
What doesn't seem safe?
Can i store cookie with environment variable instead of cookie.json
Make a pull request if you wish as an option
IMHO, placing these in that separate JSON file is exactly as safe as placing them in the env variable. They both get referenced by the code. If "the enemy" has access to your JSON then they have equal access to your .bashrc or wherever you may keep that variable.
Interestingly enough the stored cookie works even some days afterwards. See also my today's end-user "naive" comments about Edge Chat session impermanence and how they wipe it with chocolate, mediation, and Japanese cultural joyful customs against human toxic answers, to avoid Taybot chat session cache problems.
@acheong08 We can already store cookies from environment variables with cookies
argument in ChatBot class
cookies = json.loads(os.environ.get("BING_COOKIES"))
The issue I found is that version of EdgeGPT in PyPI and in GitHub are out of sync The latest version in PyPi had no support for cookies argument in ChatBot class I had to install from GitHub to solve the issue
You can close this issue
https://github.com/acheong08/EdgeGPT/releases/tag/0.0.52