acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28.01k stars 4.48k forks source link

[Bug]: can not login V1 by email and password #1386

Closed ShilongJiao closed 1 year ago

ShilongJiao commented 1 year ago

Is there an existing issue for this?

What happened?

I can not login v1 by email and password

Steps to reproduce the problem

The following is login code.

` def login(self) -> None: """Login to OpenAI by email and password""" if self.config.get("email") and self.config.get("password"): log.error("Insufficient login details provided!") error = t.AuthenticationError("Insufficient login details provided!") raise error auth = Authenticator( email_address=self.config.get("email"), password=self.config.get("password"), proxy=self.config.get("proxy"), ) log.debug("Using authenticator to get access token")

    auth.begin()
    auth.get_access_token()

    self.set_access_token(auth.access_token)

`

the problem is in if self.config.get("email") and self.config.get("password"):

maybe it is be fixed to

if !self.config.get("email") or !self.config.get("password"):

It will run well.

What should have happened?

I can not login v1 by email and password

Version where the problem happens

The newest version in 2023 05 24

What Python version are you running this with?

3.11

What is your operating system ?

MacOS

Command Line Arguments

Nothing

Console logs

Nothing

Additional information

No response

acheong08 commented 1 year ago

Yes, it has been broken for a while. I will translate the current Go code to Python when I get the time

acheong08 commented 1 year ago

Hey it's fixed

ShilongJiao commented 1 year ago

thank you for fixing it .

acheong08 commented 1 year ago

np. Credits to @pengzhile for the Python version