m1guelpf / chatgpt-telegram

Run your own GPTChat Telegram bot, with a single command!
MIT License
3.89k stars 558 forks source link

Can't use because I used Google Single Sign On as auth for OpenAI #4

Closed nikitavoloboev closed 1 year ago

nikitavoloboev commented 1 year ago
image

Get this after trying to login with Google.

The issue is that in OpenAI web page, I can't see how I can make it work with email/password if I chose Google sign on once.

Is there any way I can perhaps make it work?

nikitavoloboev commented 1 year ago

I opened an issue with OpenAI to support adding email/pass combo to existing accounts that chose Google sign on. Hopefully they reply soon and resolve it.

nikitavoloboev commented 1 year ago

But I do wonder if there is any way to hack around this in the time I wait for response from them.

2022/12/04 16:36:17 Please log in to OpenAI Chat

Perhaps I can pass the key manually? And do auth in my normal browser or something.

nPokemon commented 1 year ago

Signing using email + pass is working fine.

nikitavoloboev commented 1 year ago

I made new OpenAI account.

But now it breaks, when I press login, the Playwright chrome window just goes away. Don't know why.

image

Just see this in terminal.

m1guelpf commented 1 year ago

Hmm, sign in with Google works fine for me.

nikitavoloboev commented 1 year ago

sign in with Google works fine for me

Any reason why it can break? 🤔

nikitavoloboev commented 1 year ago

btw can I reinstall Playwright?

koeppelmann commented 1 year ago

I also can't log in with Google in chromium. Either get the same error message from google or it just crashes. Would it be possible to instead use the openAI API key?

nikitavoloboev commented 1 year ago

Or maybe use https://github.com/acheong08/ChatGPT directly

GitHub
GitHub - acheong08/ChatGPT: Lightweight package for interacting with ChatGPT's API by OpenAI. Uses reverse engineered official API.
Lightweight package for interacting with ChatGPT's API by OpenAI. Uses reverse engineered official API. - GitHub - acheong08/ChatGPT: Lightweight package for interacting with ChatGPT's API ...
nikitavoloboev commented 1 year ago

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

GitHub
GitHub - transitive-bullshit/chatgpt-api: Node.js wrapper around ChatGPT. Uses headless Chrome until the official API is released.
Node.js wrapper around ChatGPT. Uses headless Chrome until the official API is released. - GitHub - transitive-bullshit/chatgpt-api: Node.js wrapper around ChatGPT. Uses headless Chrome until the o...
nikitavoloboev commented 1 year ago

I will try look at the code, not sure fully how it works but I imagine you can cut away from using chromium to proxy the calls.

nikitavoloboev commented 1 year ago

Ok thanks to @m1guelpf I got it working.

For anyone else hitting this issue. Replace Chromium with Safari and do authentication.

In playwright.RunOptions do Browsers: []string{"webkit"},

And do browser, err := pw.WebKit. in launchBrowser function.