lencx / ChatGPT

🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
https://nofwl.com
51.73k stars 5.81k forks source link

解决ChatGPT使用过程中频繁刷新的问题 #838

Open jixing475 opened 1 year ago

jixing475 commented 1 year ago

Feature description

最近 ChatGPT使用过程中频繁刷新, 十分影响体验

有款油泼猴(Tampermonkey)插件,解决各类ChatGPT使用过程中的问题,亲测有效,但是不知道怎么整合到桌面版中.

这款插件解决问题如下:

Motivation

解决ChatGPT使用过程中频繁刷新的问题

Alternatives

No response

Additional context

No response

SEAHAISEA commented 1 year ago

大佬地址404啦

RebelYoung commented 1 year ago

大佬地址404啦

https://github.com/xcanwin/KeepChatGPT

RebelYoung commented 1 year ago

支持这个提议

Iven3567 commented 1 year ago

测试一下这个脚本,说明IT问题不论是YouTube还是google的都没用,搜不到这个结果,还是要去github上找。

Jett-Zhang commented 1 year ago

请大佬整合的桌面版中,现在频繁断,好难受

ttimasdf commented 1 year ago

To keep ChatGPT site from refreshing by automatic refreshing pages and solve/bypass Cloudflare captcha in background,

  1. Choose Preferences - Inject Script (or keyboard shortcut Ctrl-J) to open user script editor.
  2. Paste the following content.
  3. Restart ChatGPT client.
// *** ChatGPT User Script ***
// @github: https://github.com/lencx/ChatGPT
// @path: C:\Users\user\.chatgpt\main.js

if (window === window.parent) {
    // running in top window.

    import('https://cdn.jsdelivr.net/gh/chatgptjs/chatgpt.js@6aaf7aaa199582b9cde757a06a99c68abca9f928/dist/chatgpt-1.4.1.min.js')
    .then(module => {
        chatgpt.autoRefresh.activate(35);
    })

    console.log('🤩 Hello ChatGPT mod!!!');
} else {
    // Running in iframe, maybe #refresh-frame injected by auto-refresher.
}
RebelYoung commented 1 year ago
  1. Choose Preferences - Inject Script (or keyboard shortcut Ctrl-J) to open user script editor.
  2. Paste the following content.
  3. Restart ChatGPT client.
// *** ChatGPT User Script ***
// @github: https://github.com/lencx/ChatGPT
// @path: C:\Users\user\.chatgpt\main.js

if (window === window.parent) {
    // running in top window.

    import('https://cdn.jsdelivr.net/gh/chatgptjs/chatgpt.js@6aaf7aaa199582b9cde757a06a99c68abca9f928/dist/chatgpt-1.4.1.min.js')
    .then(module => {
        chatgpt.autoRefresh.activate(35);
    })

    console.log('🤩 Hello ChatGPT mod!!!');
} else {
    // Running in iframe, maybe #refresh-frame injected by auto-refresher.
}

image What's wrong?

ttimasdf commented 1 year ago
  1. Choose Preferences - Inject Script (or keyboard shortcut Ctrl-J) to open user script editor.
  2. Paste the following content.
  3. Restart ChatGPT client.
// *** ChatGPT User Script ***
// @github: https://github.com/lencx/ChatGPT
// @path: C:\Users\user\.chatgpt\main.js

if (window === window.parent) {
    // running in top window.

    import('https://cdn.jsdelivr.net/gh/chatgptjs/chatgpt.js@6aaf7aaa199582b9cde757a06a99c68abca9f928/dist/chatgpt-1.4.1.min.js')
    .then(module => {
        chatgpt.autoRefresh.activate(35);
    })

    console.log('🤩 Hello ChatGPT mod!!!');
} else {
    // Running in iframe, maybe #refresh-frame injected by auto-refresher.
}

image What's wrong?

This script is not meant to be run directly through double clicking... but to be loaded by ChatGPT client and got injected automatically.

The corresponding menu item:

image

RebelYoung commented 1 year ago

image What's wrong?

This script is not meant to be run directly through double clicking... but to be loaded by ChatGPT client and got injected automatically.

The corresponding menu item:

image

Yes, but the window jump directly after ctrl+j.

Jett-Zhang commented 1 year ago
  1. 选择Preferences - Inject Script (或键盘快捷键Ctrl-J)打开用户脚本编辑器。
  2. 粘贴以下内容。
  3. 重新启动 ChatGPT 客户端。
// *** ChatGPT User Script ***
// @github: https://github.com/lencx/ChatGPT
// @path: C:\Users\user\.chatgpt\main.js

if (window === window.parent) {
    // running in top window.

    import('https://cdn.jsdelivr.net/gh/chatgptjs/chatgpt.js@6aaf7aaa199582b9cde757a06a99c68abca9f928/dist/chatgpt-1.4.1.min.js')
    .then(module => {
        chatgpt.autoRefresh.activate(35);
    })

    console.log('🤩 Hello ChatGPT mod!!!');
} else {
    // Running in iframe, maybe #refresh-frame injected by auto-refresher.
}

Added this code, but the gpt network still breaks

ttimasdf commented 1 year ago

Yes, but the window jump directly after ctrl+j.

Set VSCode or any other code editor as default file handler for .js, or edit the file directly at the path shown in your screenshot.

Added this code, but the gpt network still breaks

Changing IP may help, swap to another VPN node or whatever. ChatGPT is using Cloudflare with a policy which is quite strict on client IP. Captcha clearance can be really short if IP is flagged as high risk. especially with multiple accounts sign in from same location. So this script cannot guarantee 100% even for me 😂

Set a shorter refresh interval won't help.

Cerf-Volant425 commented 1 year ago

anyone found it works or not?

RebelYoung commented 1 year ago

anyone found it works or not?

it doesn't work.

yaoyy833 commented 1 year ago

为什么我的IP老是显示登录不了

Jett-Zhang commented 1 year ago

有人发现它有效吗?

它不起作用。

是的,我也发现,并没有起作用。

QuantumRoseinAmethystVase commented 1 year ago

重议