kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
chore: update ts docs
rodzic
7222b7f296
commit
b66d9b5ec2
|
@ -49,7 +49,7 @@ An error if it fails.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:69](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L69)
|
||||
[src/abstract-chatgpt-api.ts:69](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
|
@ -66,7 +66,7 @@ otherwise.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:39](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L39)
|
||||
[src/abstract-chatgpt-api.ts:39](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
|
@ -87,7 +87,7 @@ An error if the session failed to initialize properly.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:10](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L10)
|
||||
[src/abstract-chatgpt-api.ts:10](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
|
@ -111,7 +111,7 @@ Access credentials for the new session.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:49](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L49)
|
||||
[src/abstract-chatgpt-api.ts:49](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
|
@ -135,7 +135,7 @@ Access credentials for the new session.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:59](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L59)
|
||||
[src/abstract-chatgpt-api.ts:59](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
|
@ -164,4 +164,4 @@ the `response` text.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L30)
|
||||
[src/abstract-chatgpt-api.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L30)
|
||||
|
|
|
@ -64,7 +64,7 @@ to obtain your `clearanceToken`.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:45](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L45)
|
||||
[src/chatgpt-api.ts:45](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L45)
|
||||
|
||||
## Accessors
|
||||
|
||||
|
@ -80,7 +80,7 @@ Gets the current Cloudflare clearance token (`cf_clearance` cookie value).
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:143](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L143)
|
||||
[src/chatgpt-api.ts:143](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L143)
|
||||
|
||||
___
|
||||
|
||||
|
@ -96,7 +96,7 @@ Gets the current session token.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:138](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L138)
|
||||
[src/chatgpt-api.ts:138](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L138)
|
||||
|
||||
___
|
||||
|
||||
|
@ -112,7 +112,7 @@ Gets the currently signed-in user, if authenticated, `null` otherwise.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:133](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L133)
|
||||
[src/chatgpt-api.ts:133](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L133)
|
||||
|
||||
___
|
||||
|
||||
|
@ -128,7 +128,7 @@ Gets the current user agent.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:148](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L148)
|
||||
[src/chatgpt-api.ts:148](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L148)
|
||||
|
||||
## Methods
|
||||
|
||||
|
@ -152,7 +152,7 @@ An error if it fails.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:470](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L470)
|
||||
[src/chatgpt-api.ts:470](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L470)
|
||||
|
||||
___
|
||||
|
||||
|
@ -173,7 +173,7 @@ the token fails.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:367](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L367)
|
||||
[src/chatgpt-api.ts:367](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L367)
|
||||
|
||||
___
|
||||
|
||||
|
@ -194,7 +194,7 @@ is valid.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:156](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L156)
|
||||
[src/chatgpt-api.ts:156](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L156)
|
||||
|
||||
___
|
||||
|
||||
|
@ -224,7 +224,7 @@ A valid access token
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:386](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L386)
|
||||
[src/chatgpt-api.ts:386](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L386)
|
||||
|
||||
___
|
||||
|
||||
|
@ -252,7 +252,7 @@ Access credentials for the new session.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/abstract-chatgpt-api.ts:59](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/abstract-chatgpt-api.ts#L59)
|
||||
[src/abstract-chatgpt-api.ts:59](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/abstract-chatgpt-api.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
|
@ -287,7 +287,7 @@ The response from ChatGPT
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:180](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L180)
|
||||
[src/chatgpt-api.ts:180](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L180)
|
||||
|
||||
___
|
||||
|
||||
|
@ -307,4 +307,4 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api.ts:324](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api.ts#L324)
|
||||
[src/chatgpt-api.ts:324](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api.ts#L324)
|
||||
|
|
|
@ -48,9 +48,11 @@ Creates a new client for automating the ChatGPT webapp.
|
|||
| `opts.email` | `string` | - |
|
||||
| `opts.executablePath?` | `string` | **`Default Value`** `undefined` * |
|
||||
| `opts.isGoogleLogin?` | `boolean` | **`Default Value`** `false` * |
|
||||
| `opts.isMicrosoftLogin?` | `boolean` | **`Default Value`** `false` * |
|
||||
| `opts.markdown?` | `boolean` | **`Default Value`** `true` * |
|
||||
| `opts.minimize?` | `boolean` | **`Default Value`** `true` * |
|
||||
| `opts.password` | `string` | - |
|
||||
| `opts.proxyServer?` | `string` | **`Default Value`** `undefined` * |
|
||||
|
||||
#### Overrides
|
||||
|
||||
|
@ -58,7 +60,7 @@ Creates a new client for automating the ChatGPT webapp.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:36](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L36)
|
||||
[src/chatgpt-api-browser.ts:38](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L38)
|
||||
|
||||
## Accessors
|
||||
|
||||
|
@ -72,7 +74,7 @@ Creates a new client for automating the ChatGPT webapp.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:524](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L524)
|
||||
[src/chatgpt-api-browser.ts:541](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L541)
|
||||
|
||||
## Methods
|
||||
|
||||
|
@ -92,7 +94,7 @@ Creates a new client for automating the ChatGPT webapp.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:173](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L173)
|
||||
[src/chatgpt-api-browser.ts:187](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L187)
|
||||
|
||||
___
|
||||
|
||||
|
@ -112,7 +114,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:210](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L210)
|
||||
[src/chatgpt-api-browser.ts:224](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L224)
|
||||
|
||||
___
|
||||
|
||||
|
@ -136,7 +138,7 @@ An error if it fails.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:512](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L512)
|
||||
[src/chatgpt-api-browser.ts:526](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L526)
|
||||
|
||||
___
|
||||
|
||||
|
@ -157,7 +159,7 @@ otherwise.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:302](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L302)
|
||||
[src/chatgpt-api-browser.ts:316](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L316)
|
||||
|
||||
___
|
||||
|
||||
|
@ -182,7 +184,7 @@ An error if the session failed to initialize properly.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:94](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L94)
|
||||
[src/chatgpt-api-browser.ts:106](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
|
@ -202,7 +204,7 @@ Attempts to handle 403 errors by refreshing the page.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:282](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L282)
|
||||
[src/chatgpt-api-browser.ts:296](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L296)
|
||||
|
||||
___
|
||||
|
||||
|
@ -222,7 +224,7 @@ Attempts to handle 401 errors by re-authenticating.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:263](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L263)
|
||||
[src/chatgpt-api-browser.ts:277](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L277)
|
||||
|
||||
___
|
||||
|
||||
|
@ -236,7 +238,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:504](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L504)
|
||||
[src/chatgpt-api-browser.ts:518](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L518)
|
||||
|
||||
___
|
||||
|
||||
|
@ -269,4 +271,4 @@ the `response` text.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/chatgpt-api-browser.ts:379](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/chatgpt-api-browser.ts#L379)
|
||||
[src/chatgpt-api-browser.ts:393](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/chatgpt-api-browser.ts#L393)
|
||||
|
|
|
@ -66,7 +66,7 @@ node_modules/.pnpm/typescript@4.9.3/node_modules/typescript/lib/lib.es2022.error
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:297](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L297)
|
||||
[src/types.ts:297](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L297)
|
||||
|
||||
___
|
||||
|
||||
|
@ -76,7 +76,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:296](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L296)
|
||||
[src/types.ts:296](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L296)
|
||||
|
||||
___
|
||||
|
||||
|
@ -86,7 +86,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:294](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L294)
|
||||
[src/types.ts:294](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L294)
|
||||
|
||||
___
|
||||
|
||||
|
@ -96,4 +96,4 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:295](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L295)
|
||||
[src/types.ts:295](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L295)
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:109](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L109)
|
||||
[src/types.ts:109](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L109)
|
||||
|
||||
___
|
||||
|
||||
|
@ -80,7 +80,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:300](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L300)
|
||||
[src/types.ts:300](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L300)
|
||||
|
||||
___
|
||||
|
||||
|
@ -98,7 +98,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:306](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L306)
|
||||
[src/types.ts:306](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L306)
|
||||
|
||||
___
|
||||
|
||||
|
@ -108,7 +108,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:1](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L1)
|
||||
[src/types.ts:1](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L1)
|
||||
|
||||
___
|
||||
|
||||
|
@ -130,7 +130,7 @@ https://chat.openapi.com/backend-api/conversation
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:134](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L134)
|
||||
[src/types.ts:134](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L134)
|
||||
|
||||
___
|
||||
|
||||
|
@ -148,7 +148,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:251](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L251)
|
||||
[src/types.ts:251](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L251)
|
||||
|
||||
___
|
||||
|
||||
|
@ -173,7 +173,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:257](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L257)
|
||||
[src/types.ts:257](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L257)
|
||||
|
||||
___
|
||||
|
||||
|
@ -183,7 +183,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:276](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L276)
|
||||
[src/types.ts:276](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L276)
|
||||
|
||||
___
|
||||
|
||||
|
@ -200,7 +200,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:270](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L270)
|
||||
[src/types.ts:270](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L270)
|
||||
|
||||
___
|
||||
|
||||
|
@ -222,7 +222,7 @@ https://chat.openapi.com/backend-api/conversation/message_feedback
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:193](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L193)
|
||||
[src/types.ts:193](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L193)
|
||||
|
||||
___
|
||||
|
||||
|
@ -232,7 +232,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:249](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L249)
|
||||
[src/types.ts:249](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L249)
|
||||
|
||||
___
|
||||
|
||||
|
@ -252,7 +252,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:222](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L222)
|
||||
[src/types.ts:222](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L222)
|
||||
|
||||
___
|
||||
|
||||
|
@ -262,7 +262,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:220](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L220)
|
||||
[src/types.ts:220](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L220)
|
||||
|
||||
___
|
||||
|
||||
|
@ -272,7 +272,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:275](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L275)
|
||||
[src/types.ts:275](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L275)
|
||||
|
||||
___
|
||||
|
||||
|
@ -290,7 +290,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:77](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L77)
|
||||
[src/types.ts:77](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
|
@ -308,7 +308,7 @@ https://chat.openapi.com/backend-api/models
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L70)
|
||||
[src/types.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
|
@ -327,7 +327,7 @@ https://chat.openapi.com/backend-api/moderations
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L97)
|
||||
[src/types.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
|
@ -347,7 +347,7 @@ https://chat.openapi.com/backend-api/moderations
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:114](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L114)
|
||||
[src/types.ts:114](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L114)
|
||||
|
||||
___
|
||||
|
||||
|
@ -369,7 +369,7 @@ to authenticate with the unofficial ChatGPT API.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/openai-auth.ts:27](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/openai-auth.ts#L27)
|
||||
[src/openai-auth.ts:27](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/openai-auth.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
|
@ -387,7 +387,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:161](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L161)
|
||||
[src/types.ts:161](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L161)
|
||||
|
||||
___
|
||||
|
||||
|
@ -404,7 +404,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:178](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L178)
|
||||
[src/types.ts:178](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L178)
|
||||
|
||||
___
|
||||
|
||||
|
@ -414,7 +414,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:3](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L3)
|
||||
[src/types.ts:3](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L3)
|
||||
|
||||
___
|
||||
|
||||
|
@ -424,7 +424,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:288](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L288)
|
||||
[src/types.ts:288](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L288)
|
||||
|
||||
___
|
||||
|
||||
|
@ -446,7 +446,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:278](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L278)
|
||||
[src/types.ts:278](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L278)
|
||||
|
||||
___
|
||||
|
||||
|
@ -467,7 +467,7 @@ https://chat.openapi.com/api/auth/session
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:8](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L8)
|
||||
[src/types.ts:8](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
|
@ -489,7 +489,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/types.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/types.ts#L30)
|
||||
[src/types.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/types.ts#L30)
|
||||
|
||||
## Functions
|
||||
|
||||
|
@ -516,7 +516,7 @@ included them in here.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/utils.ts:73](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/utils.ts#L73)
|
||||
[src/utils.ts:73](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/utils.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
|
@ -532,7 +532,7 @@ Gets the default path to chrome's executable for the current platform.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/openai-auth.ts:362](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/openai-auth.ts#L362)
|
||||
[src/openai-auth.ts:415](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/openai-auth.ts#L415)
|
||||
|
||||
___
|
||||
|
||||
|
@ -548,7 +548,7 @@ recognizes it and blocks access.
|
|||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `opts` | `PuppeteerLaunchOptions` & { `captchaToken?`: `string` ; `nopechaKey?`: `string` } |
|
||||
| `opts` | `PuppeteerLaunchOptions` & { `captchaToken?`: `string` ; `nopechaKey?`: `string` ; `proxyServer?`: `string` } |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
@ -556,7 +556,7 @@ recognizes it and blocks access.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/openai-auth.ts:215](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/openai-auth.ts#L215)
|
||||
[src/openai-auth.ts:241](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/openai-auth.ts#L241)
|
||||
|
||||
___
|
||||
|
||||
|
@ -588,9 +588,11 @@ with your updated credentials.
|
|||
| `__namedParameters.email?` | `string` |
|
||||
| `__namedParameters.executablePath?` | `string` |
|
||||
| `__namedParameters.isGoogleLogin?` | `boolean` |
|
||||
| `__namedParameters.isMicrosoftLogin?` | `boolean` |
|
||||
| `__namedParameters.nopechaKey?` | `string` |
|
||||
| `__namedParameters.page?` | `Page` |
|
||||
| `__namedParameters.password?` | `string` |
|
||||
| `__namedParameters.proxyServer?` | `string` |
|
||||
| `__namedParameters.timeoutMs?` | `number` |
|
||||
|
||||
#### Returns
|
||||
|
@ -599,7 +601,7 @@ with your updated credentials.
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/openai-auth.ts:49](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/openai-auth.ts#L49)
|
||||
[src/openai-auth.ts:49](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/openai-auth.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
|
@ -619,7 +621,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/utils.ts:39](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/utils.ts#L39)
|
||||
[src/utils.ts:39](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/utils.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
|
@ -639,7 +641,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/utils.ts:12](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/utils.ts#L12)
|
||||
[src/utils.ts:12](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/utils.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
|
@ -659,7 +661,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/utils.ts:29](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/utils.ts#L29)
|
||||
[src/utils.ts:29](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/utils.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
|
@ -679,4 +681,4 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[src/utils.ts:19](https://github.com/transitive-bullshit/chatgpt-api/blob/d87ae67/src/utils.ts#L19)
|
||||
[src/utils.ts:19](https://github.com/transitive-bullshit/chatgpt-api/blob/7222b7f/src/utils.ts#L19)
|
||||
|
|
|
@ -4,13 +4,7 @@ chatgpt / [Exports](modules.md)
|
|||
|
||||
On December 11th, OpenAI added Cloudflare protections that make it more difficult to access the unofficial API.
|
||||
|
||||
This package has been updated to use Puppeteer to automatically log in to ChatGPT and extract the necessary auth credentials. 🔥
|
||||
|
||||
Even with this in place, however, it's common to run into 429 / 403 errors at the moment using the `getOpenAIAuth` + `ChatGPTAPI` approach.
|
||||
|
||||
To circumvent these issues, we've also added a **full browser-based solution**, which uses Puppeteer to login and automate the webapp.
|
||||
|
||||
The full browser version is working consistently and can be used via:
|
||||
To circumvent these protections, we've added a **fully automated browser-based solution**, which uses Puppeteer and CAPTCHA solvers under the hood. 🔥
|
||||
|
||||
```ts
|
||||
import { ChatGPTAPIBrowser } from 'chatgpt'
|
||||
|
@ -25,13 +19,11 @@ const result = await api.sendMessage('Hello World!')
|
|||
console.log(result.response)
|
||||
```
|
||||
|
||||
Note that this solution is not lightweight, but it does work a lot more consistently than the REST API-based versions. I'm currently using this solution to power 10 OpenAI accounts concurrently across 10 minimized Chrome windows for my [Twitter bot](https://github.com/transitive-bullshit/chatgpt-twitter-bot). 😂
|
||||
|
||||
If you get a "ChatGPT is at capacity" error when logging in, note that this can also happen on the official webapp as well. Their servers get overloaded at times, and we're all trying our best to offer access to this amazing technology.
|
||||
This solution is not lightweight, but it does work a lot more consistently than the previous REST API-based approach. For example, I'm currently using this approach to automate 10 concurrent OpenAI accounts for my [Twitter bot](https://github.com/transitive-bullshit/chatgpt-twitter-bot). 😂
|
||||
|
||||
To use the updated version, **make sure you're using the latest version of this package and Node.js >= 18**. Then update your code following the examples below, paying special attention to the sections on [Authentication](#authentication), [Restrictions](#restrictions), and [CAPTCHAs](#captchas).
|
||||
|
||||
We recently released support for CAPTCHA automation using either [nopecha](https://nopecha.com/) or [2captcha](https://2captcha.com). Keep in mind that this package will be updated to use the official API as soon as it's released, so things should get much easier over time. 💪
|
||||
We recently added support for CAPTCHA automation using either [nopecha](https://nopecha.com/) or [2captcha](https://2captcha.com). Keep in mind that this package will be updated to use the official API as soon as it's released, so things should get much easier over time. 💪
|
||||
|
||||
Lastly, please consider starring this repo and <a href="https://twitter.com/transitive_bs">following me on twitter <img src="https://storage.googleapis.com/saasify-assets/twitter-logo.svg" alt="twitter" height="24px" align="center"></a> to help support the project.
|
||||
|
||||
|
@ -57,6 +49,7 @@ Thanks && cheers,
|
|||
- [Demos](#demos)
|
||||
- [Authentication](#authentication)
|
||||
- [CAPTCHAs](#captchas)
|
||||
- [Using Proxies](#using-proxies)
|
||||
- [Restrictions](#restrictions)
|
||||
- [Projects](#projects)
|
||||
- [Compatibility](#compatibility)
|
||||
|
@ -220,6 +213,8 @@ npx tsx demos/demo-conversation-browser.ts
|
|||
|
||||
### Authentication
|
||||
|
||||
The authentication section relates to the REST-based version (using `getOpenAIAuth` + `ChatGPTAPI`). The browser-based solution, `ChatGPTAPIBrowser`, takes care of all the authentication for you.
|
||||
|
||||
On December 11, 2022, OpenAI added some additional Cloudflare protections which make it more difficult to access the unofficial API.
|
||||
|
||||
You'll need a valid OpenAI "session token" and Cloudflare "clearance token" in order to use the API.
|
||||
|
@ -250,7 +245,7 @@ Pass `sessionToken`, `clearanceToken`, and `userAgent` to the `ChatGPTAPI` const
|
|||
|
||||
### CAPTCHAs
|
||||
|
||||
The browser portions of this package use Puppeteer to automate as much as possible, including all CAPTCHAs. 🔥
|
||||
The browser portions of this package use Puppeteer to automate as much as possible, including solving all CAPTCHAs. 🔥
|
||||
|
||||
Basic Cloudflare CAPTCHAs are handled by default, but if you want to automate the email + password Recaptchas, you'll need to sign up for one of these paid providers:
|
||||
|
||||
|
@ -272,6 +267,22 @@ const api = new ChatGPTAPIBrowser({
|
|||
})
|
||||
```
|
||||
|
||||
### Using Proxies
|
||||
|
||||
The browser implementation supports setting a proxy server. This is useful if you're running into rate limiting issues or if you want to use a proxy to hide your IP address.
|
||||
|
||||
To use a proxy, pass the `proxyServer` option to the `ChatGPTAPIBrowser` constructor, or simply set the `PROXY_SERVER` env var. For more information on the format, see [here](https://www.chromium.org/developers/design-documents/network-settings).
|
||||
|
||||
```ts
|
||||
const api = new ChatGPTAPIBrowser({
|
||||
email: process.env.OPENAI_EMAIL,
|
||||
password: process.env.OPENAI_PASSWORD,
|
||||
proxyServer: '<ip>:<port>'
|
||||
})
|
||||
```
|
||||
|
||||
You can also set the `PROXY_VALIDATE_IP` env var to your proxy's IP address. This will be used to validate that the proxy is working correctly, and will throw an error if it's not.
|
||||
|
||||
### Restrictions
|
||||
|
||||
These restrictions are for the `getOpenAIAuth` + `ChatGPTAPI` solution, which uses the unofficial API. The browser-based solution, `ChatGPTAPIBrowser`, generally doesn't have any of these restrictions.
|
||||
|
@ -337,6 +348,8 @@ All of these awesome projects are built using the `chatgpt` package. 🤯
|
|||
- [iOS Shortcut](https://github.com/leecobaby/shortcuts/blob/master/other/ChatGPT_EN.md)
|
||||
- [Slack Bot](https://github.com/trietphm/chatgpt-slackbot/)
|
||||
- [Electron Bot](https://github.com/ShiranAbir/chaty)
|
||||
- [Kodyfire CLI](https://github.com/nooqta/chatgpt-kodyfire)
|
||||
- [Twitch Bot](https://github.com/BennyDeeDev/chatgpt-twitch-bot)
|
||||
|
||||
If you create a cool integration, feel free to open a PR and add it to the list.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue