Giter Site home page Giter Site logo

privategpt-whatsapp's Introduction

WhatsApp Chat Assistant for privateGPT

WhatsApp chat assistant that provides completions using privateGPT. Allows audio messages using the Deepgram API.

Prerequisites

To run this application, ensure you have the following:

  • Node.js installed.
  • A valid WhatsApp account.
  • Deepgram API key (if using the transcription feature).

Setup

  1. Clone this repository.
  2. Install dependencies by running npm install.
  3. Create a .env file based on the provided .env.example and set the necessary environment variables.
  4. Run the application using npm start.

Usage

Once the application is running, follow these steps:

  1. Scan the QR code displayed in the terminal using your WhatsApp mobile app to authenticate.
  2. Once authenticated, the application will start listening for incoming messages.
  3. Messages received from authorized users will be processed, and completions will be provided.

Configuration

  • PORT: Set the application port.
  • PRIVATE_GPT_URL: URL for the privateGPT client.
  • PRIVATE_GPT_SYSTEM: privateGPT system prompt to modify behaviour.
  • ALLOWED_USERS: Comma separated list of authorized users' phone numbers ([email protected]).
  • DEEPGRAM_API_KEY: Add your Deepgram API key to enable transcription of audio messages.

File Structure

  • index.js: Main entry point of the application.
  • page.js: Contains functions to serve the HTML page.
  • client.js: Initializes the WhatsApp client and handles message processing.
  • dpgm.js: Handles audio transcription using the Deepgram SDK.
  • pgpt.js: Provides functions to generate completions for given prompts.

License

This project is licensed under the MIT License.

Acknowledgments

This application utilizes the privateGPT, refer to their documentation for more information.

privategpt-whatsapp's People

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.