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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatGPT Teams broke the script #173

Open
gadelkareem opened this issue Jan 21, 2024 · 6 comments
Open

ChatGPT Teams broke the script #173

gadelkareem opened this issue Jan 21, 2024 · 6 comments

Comments

@gadelkareem
Copy link

gadelkareem commented Jan 21, 2024

Looks like the script is not working with the new ChatGPT Teams subscriptions. Getting Uncaught (in promise) 馃 chatgpt.js >> No chat with id = xxxxx-xxxx-xxx found.

@adamlui
Copy link
Member

adamlui commented Jan 21, 2024

hey @gadelkareem was it a false alarm?

@gadelkareem gadelkareem reopened this Jan 21, 2024
@adamlui
Copy link
Member

adamlui commented Jan 21, 2024

@gadelkareem also I don't have or know what a Teams subscription is to investigate :(

@gadelkareem
Copy link
Author

First error was my code but indeed they changed something. The URL look like this https://chat.openai.com/g/mygptname/c/xxxxx-xxxx-xxx

No worries, I will update here if I get anywhere.

@gadelkareem
Copy link
Author

@adamlui The chatgpt.getResponseFromAPI('last') method is timing out. Using chatgpt.getResponseFromDOM('last') worked as expected. I believe the issue is that most functions attempt to fetch data from the API before falling back to the DOM.

@adamlui
Copy link
Member

adamlui commented May 7, 2024

hey @gadelkareem I don't know how to get to GPTs to see the URL structure you pasted, but you can probably easily fix it by editing the regex @ https://github.com/KudoAI/chatgpt.js/blob/v2.6.9/chatgpt.js#L745C1-L745C64

            const re_chatID = /\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/;

...by using | after \w{12} and inserting the pattern that matches the ID structure you pasted

@adamlui
Copy link
Member

adamlui commented May 7, 2024

@gadelkareem if it's exactly what you pasted, can you update that line to

            const re_chatID = /\w{8}-\w{4}-\w{4}-\w{4}-\w{12}|\w{5}-\w{4}-\w{3}/;

...and see if it works?

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

2 participants