kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: minor fix for timeouts
rodzic
b4f1ff799b
commit
9aeb17e7f7
|
@ -315,7 +315,7 @@ This package is ESM-only. It supports:
|
|||
|
||||
## Credits
|
||||
|
||||
- Huge thanks to [@waylaidwanderer](https://github.com/waylaidwanderer), [@wong2](https://github.com/wong2), [@simon300000](https://github.com/simon300000), [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪
|
||||
- Huge thanks to [@abacaj](https://github.com/abacaj), [@waylaidwanderer](https://github.com/waylaidwanderer), [@wong2](https://github.com/wong2), [@simon300000](https://github.com/simon300000), [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪
|
||||
- The original browser version was inspired by this [Go module](https://github.com/danielgross/whatsapp-gpt) by [Daniel Gross](https://github.com/danielgross)
|
||||
- [OpenAI](https://openai.com) for creating [ChatGPT](https://openai.com/blog/chatgpt/) 🔥
|
||||
|
||||
|
|
|
@ -88,11 +88,11 @@ export class ChatGPTAPIBrowser {
|
|||
|
||||
if (url !== chatUrl) {
|
||||
await this._page.goto(chatUrl, {
|
||||
waitUntil: 'networkidle0'
|
||||
waitUntil: 'networkidle2'
|
||||
})
|
||||
}
|
||||
|
||||
// dismiss welcome modal
|
||||
// dismiss welcome modal (and other modals)
|
||||
do {
|
||||
const modalSelector = '[data-headlessui-state="open"]'
|
||||
|
||||
|
@ -107,7 +107,7 @@ export class ChatGPTAPIBrowser {
|
|||
break
|
||||
}
|
||||
|
||||
await delay(500)
|
||||
await delay(300)
|
||||
} while (true)
|
||||
|
||||
if (!this.getIsAuthenticated()) {
|
||||
|
@ -206,7 +206,7 @@ export class ChatGPTAPIBrowser {
|
|||
try {
|
||||
await maximizePage(this._page)
|
||||
await this._page.reload({
|
||||
waitUntil: 'networkidle0',
|
||||
waitUntil: 'networkidle2',
|
||||
timeout: 2 * 60 * 1000 // 2 minutes
|
||||
})
|
||||
await minimizePage(this._page)
|
||||
|
|
Ładowanie…
Reference in New Issue