Skip to content

Go-lang implmention of whatsapp-bot using currently maintained whatsmeow library

License

Notifications You must be signed in to change notification settings

SomnathDas/whatsapp-botto-go

Repository files navigation

GNU License Contributers


Logo

Whatsapp Botto Go

A basic automation program written in go-lang using whatsmeow library along with open-ai's CHAT-GPT and ElevenLabs AI TTS.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Meet Valarie Whatsapp-Botto-Go

Features

  • Send Text Messages
  • Send Text Message as Reply
  • Send Audio Message as Reply
  • Persist OpenAI Chat Context
  • Jailbreak GPT
  • Custom Personality

-> One must remember, this chat bot remembers context in a streamlined manner, meaning even if you use this in a group, different messages by different user will be treated as multiple messages from same user.

(back to top)

Built With

  • Go
  • ChatGPT
  • WhatsApp

(back to top)

Getting Started

These instructions are mainly written with Linux based operating system in mind. However these requirements shouldn't differ a lot. Feel free to ask any query.

Prerequisites

Are Using Windows?

I won't ask that why you are using windows for these kind of things?, but let's go the easier way!

  • Install Windows Subsystem for Linux Installation Guide
  • Install go in Windows Subsystem for Linux
  • Install Ffmpeg in Windows Subsystem for Linux
  • Install libopus-dev in Windows Subsystem for Linux
  • Follow the below Installation instruction in Windows Subsystem for Linux (WSL)
  • After this while creating .env file, for AUDIO_FOLDER_ABSOLUTE_PATH="/home/<username>/whatsapp-botto-go/audio/", make sure to OMIT //wsl.localhost/<your os name, for ex. Ubuntu>/ part.

Installation

  1. Clone the repo
    git clone https://github.com/SomnathDas/whatsapp-botto-go.git
  2. Install required GO packages by typing following commands
cd whatsapp-botto-go
go get
  1. Create .env file in root dir of the project and enter the following in .env file
 OPEN_AI_CHATGPT_API_KEY=""
 ELEVEN_LABS_TTS_API_KEY=""
 ELEVEN_LABS_VOICE_ID=""
 ELEVEN_LABS_MODEL_ID="eleven_monolingual_v1"
 WHATSAPP_NUMBER=""
 AUDIO_FOLDER_ABSOLUTE_PATH=""
  1. Run the app by typing the following command in root directory of this project
    go run *.go

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GNU Affero General Public License v3.0 License. See LICENSE.txt for more information.

(back to top)

Contact

Somnath Das - @instagram_handle

Project Link: https://github.com/SomnathDas/whatsapp-botto-go

(back to top)

Acknowledgments

I whole heartedly thank these amazing men/women for their time and effort.

(back to top)

Releases

No releases published

Packages

No packages published

Languages