Giter Club home page Giter Club logo

whatsapp-chatgpt's Introduction

GPT + DALL-E + Whatsapp = AI Assistant ๐Ÿš€

Docker Prettier License: MIT

Discord Invite

This WhatsApp bot uses OpenAI's GPT and DALL-E 2 to respond to user inputs.

Example prompts

Requirements

  • Node.js (18 or newer)
  • A recent version of npm
  • An OpenAI Account

Installation

  1. Clone this repository
  2. Install the required packages by running npm install
  3. Put your OpenAI API key into the .env file
  4. Run the bot using npm run start
  5. Scan the QR code with WhatsApp (link a device)
  6. Now you're ready to go! People can send you messages, and the bot will respond to them

Docker

Make sure to edit the docker-compose.yml file and set your own variables there.

sudo docker-compose up

Usage

To use the bot, simply send a message with the !gpt/!dalle/!config command followed by your prompt. For example:

GPT

!gpt What is the meaning of life?

DALLE

!dalle A frog with a red hat is walking on a bridge.

AI Config

To modify the bot's configuration, you can use the !config command. For example:

!config <target> <type> <value>

e.g.
!config dalle size 256x256

Disable prefix

You can disable the !gpt/!dalle/!config prefix by setting PREFIX_ENABLED to false in the .env file.
If you disable the prefix, the bot will not support DALL-E, and only GPT will be used.

Sending messages to yourself

This bot also supports sending messages to yourself.

To use this feature, simply send a message to your own phone number using the WhatsApp link https://wa.me/<your_phone_number>. This will take you to your own chat window.

After gaining access to your own chat, you can send a message to yourself and the bot will respond.

Disclaimer

The operations performed by this bot are not free. You will be charged by OpenAI for each request you make.

This bot uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

NOTE: We can't guarantee you will not be blocked by using this method, although it works. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.

Contributors

Used libraries

Star History

Star History Chart

whatsapp-chatgpt's People

Contributors

andrewssobral avatar byt3magic avatar connorv001 avatar ezxd avatar hemangjoshi37a avatar marcomafessolli avatar navopw avatar rishabhg71 avatar sennett-lau avatar sharp0111 avatar steve-hb avatar ttebify avatar zain-ul-din avatar

Stargazers

 avatar

Watchers

 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.