zsodur / chatgpt-api-by-browser-script

This project runs on users' browsers through the Tampermonkey script and converts the web version of ChatGPT operations into an API interface. This way, you can use GPT-4 in chatgpt web pages to play things like Auto-GPT. / 该项目通过Tampermonkey脚本在用户的浏览器上运行,并将ChatGPT操作的Web版本转换为API接口。这样,您就可以使用chatgpt网页中的GPT-4来玩Auto-GPT等内容。
195 stars 40 forks source link

Update tampermonkey-script.js #6

Open CurtisAccelerate opened 1 year ago

CurtisAccelerate commented 1 year ago

Added some fixes/corrections based on new ChatGPT interface button order. Attach button broke the script. Possibly some other fixes as well -- must be reviewed but working for me.

zsodur commented 1 year ago

I tried it out, on my browser, the original script can be used normally, but your PR cannot be used properly. The output button is null. I guess it may be because other scripts on your browser are affecting the button layout.

CurtisAccelerate commented 1 year ago

The continue/regenerate button must be visible. I am using it with code interpreter. They have added an attach button to the left which breaks on yours. I had to cycle it twice but I only use with it with Code Interpreter model always. The get next sibling button selects the attach button to the left with your script. Sounds like a correct fix will need additional logic to know if it needs to get next sibling or run it twice for the data analysis / code interpreter. I confirm mine breaks on the normal. Possible fix would be to run it once and check the button text/element and if not matched run it again.