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

Doesn't work after new OpenAI Cloudflare protections #22

Closed
Galz648 opened this issue Dec 12, 2022 · 14 comments
Closed

Doesn't work after new OpenAI Cloudflare protections #22

Galz648 opened this issue Dec 12, 2022 · 14 comments

Comments

@Galz648
Copy link

Galz648 commented Dec 12, 2022

Description

Using this cli tool for the first time, posting the session token doesn't work.

  • I believe there should be a feature to set it as a local variable as it is easier to debug.

Steps to Reproduce

  • use the tool for the first time (maybe try to delete the existing token if you already used it)
  • copy the token from the browser
  • paste it into the terminal window

Expected Behavior

expected the access token to be accepted

Actual Behavior

I get a "invalid token" message.

Environment

Darwin 21.6.0

@gaui
Copy link

gaui commented Dec 12, 2022

Same here. I get:

Invalid token. Please try again.

@RomanHotsiy RomanHotsiy changed the title posting the session token doesn't work Doesn't work after new OpenAI Cloudflare protections Dec 12, 2022
@RomanHotsiy
Copy link
Owner

@sapirgolan
Copy link

Duplicate of #21

@RomanHotsiy
Copy link
Owner

I closed #21 because this one is linked from the readme.

@davidlj95
Copy link

davidlj95 commented Jan 8, 2023

I managed to workaround the issue by using chatgpt lib. It opens a browser window so you can authenticate as usual. And then proceeds to send the diff to get the commit message suggestions. It's a poor man's workaround, as you have to login every time you run the command with the browser. Buut, it's something

Check it out here:
https://github.com/davidlj95/commitgpt/tree/use-chatgpt-lib-with-puppeteer-to-bypass-cloudflare-restrictions

A win is there though: no need to copy / paste from the DevTools, as chatgpt lib grabs that info automagically. We just need to enter our email and pwd. So the process can be automated a bit more and we don't have to fill that in the browser each time.

@RomanHotsiy
Copy link
Owner

Thanks for suggestion @davidlj95.

I believe it won't work anymore but I have plan to look into what can be done on the weekend.

@friuns2
Copy link

friuns2 commented Feb 5, 2023

https://github.com/transitive-bullshit/chatgpt-api

Update February 1, 2023
This package no longer requires any browser hacks – it is now using the official OpenAI completions API with a leaked model that ChatGPT uses under the hood. 🔥

@amatzen
Copy link

amatzen commented Mar 6, 2023

New paid ChatGPT API released by @openai. Maybe switch to that instead of any "hacks" or unofficial sources.

@farhadsoft
Copy link

image
Something is wrong: Invalid token. Please try again.

@michael-sumner
Copy link

I am also experiencing the same issue Invalid token. Please try again.. Has anyone fixed their issue?

@JeanRessouche
Copy link

Same (with GPT paid account) :(

@hadees
Copy link

hadees commented Apr 7, 2023

can't it just us the official api now?

@lucaszdev
Copy link

@RomanHotsiy Fix this please

Screenshot 2023-04-11 at 16 15 12

@RomanHotsiy
Copy link
Owner

Fixed in 2.0.0 by #27

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