fatihhcan / whatsapp-chatgpt

ChatGPT + DALL-E + WhatsApp = AI Assistant :rocket:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPT + DALL-E + Whatsapp = AI Assistant 🚀

Docker Prettier License: MIT

This WhatsApp bot uses OpenAI's GPT and DALL-E 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 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.

Disable prefix

You can disable the !gpt/!dalle 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.

Disclaimer

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

Contributors

Used libraries

About

ChatGPT + DALL-E + WhatsApp = AI Assistant :rocket:


Languages

Language:TypeScript 77.3%Language:Shell 19.5%Language:Dockerfile 3.3%