From 257c23b0ea118ebb6e77698e12dbb18f9c7196d2 Mon Sep 17 00:00:00 2001 From: Daniel Ehrhardt Date: Thu, 22 Dec 2022 12:55:35 +0100 Subject: [PATCH] Added nopechaKey to ChatGPTAPIBrowser --- src/chatgpt-api-browser.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/chatgpt-api-browser.ts b/src/chatgpt-api-browser.ts index 3405b1b7..7ee62ec1 100644 --- a/src/chatgpt-api-browser.ts +++ b/src/chatgpt-api-browser.ts @@ -22,6 +22,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { protected _isGoogleLogin: boolean protected _isMicrosoftLogin: boolean protected _captchaToken: string + protected _nopechaKey: string protected _accessToken: string protected _email: string @@ -56,6 +57,9 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { /** @defaultValue `undefined` **/ captchaToken?: string + + /** @defaultValue `undefined` **/ + nopechaKey?: string /** @defaultValue `undefined` **/ executablePath?: string @@ -74,6 +78,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { isMicrosoftLogin = false, minimize = true, captchaToken, + nopechaKey, executablePath, proxyServer } = opts @@ -87,6 +92,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { this._isMicrosoftLogin = !!isMicrosoftLogin this._minimize = !!minimize this._captchaToken = captchaToken + this._nopechaKey = nopechaKey this._executablePath = executablePath this._proxyServer = proxyServer @@ -111,6 +117,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { try { this._browser = await getBrowser({ captchaToken: this._captchaToken, + nopechaKey: this._nopechaKey, executablePath: this._executablePath, proxyServer: this._proxyServer, minimize: this._minimize