Giter Club home page Giter Club logo

whatsapp-ai-reply's Introduction

WhatsApp AI Reply

Use WhatsApp client library and OpenAI client library to auto-reply to your instant messages.

โš ๏ธ Use at your own risk. The WhatsApp client library is unofficial and could get your blocked from the network.

Whats App Reply Demo

Usage

Docker

docker run \
  -e [email protected] \
  -e OPEN_AI_API_KEY=${OPEN_AI_API_KEY} \
  -e OPEN_AI_MODEL_KEY='gpt-4-1106-preview' \
  -e OPEN_AI_SYSTEM_PROMPT='You are an assistant who expands an emoji response to a message into a full text response' \
  -v ./whatsapp-auth:/mnt/auth-data \
  jmc265/whatsapp-ai-reply

Environment Variables:

  • SELF_CONTACT_ID - This is the ID that WhatsApp uses to identify you. The value is outputted to the console when you start up the app for the first time.
  • OPEN_AI_API_KEY - Your API key for OpenAI
  • OPEN_AI_MODEL_KEY - Choose an OpenAI model
  • OPEN_AI_SYSTEM_PROMPT - The System prompt to append to each OpenAI request

Volume Mount:

  • /mnt/auth-data - The location to store the WhatsApp authentication files

Docker Compose

version: "3.4"

services:
  whatsapp-ai-reply:
    image: jmc265/whatsapp-ai-reply
    container_name: whatsapp-ai-reply
    restart: unless-stopped
    volumes:
      - ./whatsapp-auth:/mnt/auth-data
    environment:
      SELF_CONTACT_ID: [email protected]
      OPEN_AI_API_KEY: ${OPEN_AI_API_KEY}
      OPEN_AI_MODEL_KEY: 'gpt-4-1106-preview'
      OPEN_AI_SYSTEM_PROMPT: 'You are an assistant who expands an emoji response to a message into a full text response'

Local

Make sure you set the environment variables: SELF_CONTACT_ID, OPEN_AI_API_KEY, OPEN_AI_MODEL_KEY, OPEN_AI_SYSTEM_PROMPT and then:

npm install
npm run start

whatsapp-ai-reply's People

Contributors

jmc265 avatar

Stargazers

Juan Manuel Mery avatar

Watchers

 avatar

whatsapp-ai-reply's Issues

hello I have problem with this, can anyone help?

/app/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34
const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];
^

TypeError: Cannot read properties of null (reading '1')
at LocalWebCache.persist (/app/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69)
at /app/node_modules/whatsapp-web.js/src/Client.js:744:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)



this is my first time to run this project on docker,
after that it show the error, then I search goolge,
people say

Add this argument to your Client initialization:

webVersionCache: {
type: 'remote',
remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2412.54.html',
}

However, where can I put this code for which place,
can you give me a hand?
thank you so mcuh.

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.