Code Monkey home page Code Monkey logo

whatsappbot-chatgpt's Introduction

ChatGPT API

Node.js client for the unofficial ChatGPT API and unofficial WhatsApp Baileys API.

Usage & Install

Make sure you have nodejs installed on your computer.

1. Clone this repo
2. run `npm install`
3. set `SessionToken` in config.json
4. run:
node index.js
or
nodemon index.js

Note

Per the official OpenAI Discord on December 7th, 2022: The ChatGPT servers are currently experiencing "exceptionally high demand," so some requests may slow d(https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503).

Session Tokens OpenAI

This package requires a valid session token from ChatGPT to access it's unofficial REST API.

To get a session token:

  1. Go to https://chat.openai.com/chat and log in or sign up.
  2. Open dev tools.
  3. Open Application > Cookies.
  4. Copy the value for __Secure-next-auth.session-token and save it to your config.json file.

Connect to Whatsapp

After running with node index.js or nodemon index.js in console terminal a qrcode image will appear, scan qrcode with whatsapp application oon your handphone. OoOhh, this is like login whatsapp on whatsapp web.

Compatibility

This package is ESM-only. It supports:

  • Node.js >= 16.8

Credits

whatsappbot-chatgpt's People

Contributors

rrozaq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.