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). 😂
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 is also happening quite frequently on the official webapp. Their servers are overloaded, and we're all trying our best to offer access to this amazing technology.
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.
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) and [Restrictions](#restrictions).
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) and [Restrictions](#restrictions).
...
@@ -35,7 +35,6 @@ We're working hard to improve this process (especially CAPTCHA automation). Keep
...
@@ -35,7 +35,6 @@ We're working hard to improve this process (especially CAPTCHA automation). Keep
Lastly, please consider starring this repo and <ahref="https://twitter.com/transitive_bs">following me on twitter <imgsrc="https://storage.googleapis.com/saasify-assets/twitter-logo.svg"alt="twitter"height="24px"align="center"></a> to help support the project.
Lastly, please consider starring this repo and <ahref="https://twitter.com/transitive_bs">following me on twitter <imgsrc="https://storage.googleapis.com/saasify-assets/twitter-logo.svg"alt="twitter"height="24px"align="center"></a> to help support the project.
Thanks && cheers,
Thanks && cheers,
[Travis](https://twitter.com/transitive_bs)
[Travis](https://twitter.com/transitive_bs)
---
---
...
@@ -181,7 +180,7 @@ async function example() {
...
@@ -181,7 +180,7 @@ async function example() {
### Docs
### Docs
See the [auto-generated docs](./docs/classes/ChatGPTAPI.md) for more info on methods and parameters.
See the [auto-generated docs](./docs/classes/ChatGPTAPI.md) for more info on methods and parameters. Here are the [docs](./docs/classes/ChatGPTAPIBrowser.md) for the browser-based version.
### Demos
### Demos
...
@@ -203,6 +202,12 @@ A [conversation demo](./demos/demo-conversation.ts) is also included:
...
@@ -203,6 +202,12 @@ A [conversation demo](./demos/demo-conversation.ts) is also included:
npx tsx demos/demo-conversation.ts
npx tsx demos/demo-conversation.ts
```
```
A [browser-based conversation demo](./demos/demo-conversation-browser.ts) is also included:
```bash
npx tsx demos/demo-conversation-browser.ts
```
### Authentication
### Authentication
On December 11, 2022, OpenAI added some additional Cloudflare protections which make it more difficult to access the unofficial API.
On December 11, 2022, OpenAI added some additional Cloudflare protections which make it more difficult to access the unofficial API.
...
@@ -310,7 +315,7 @@ This package is ESM-only. It supports:
...
@@ -310,7 +315,7 @@ This package is ESM-only. It supports:
## Credits
## Credits
- Huge thanks to [@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)
- 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/) 🔥
-[OpenAI](https://openai.com) for creating [ChatGPT](https://openai.com/blog/chatgpt/) 🔥