How to make a Chat GPT whatsapp bot #3095
smashah
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
You need to have your Whatsapp device on hand and an openai api key (should look something like
sk-VV8rFJMaybdyubcauydbcauybcYlqWdqFbpzz
).Step 0
Set up your project folder.
For Mac & linux
mkdir open-wa-ai cd open-wa-ai npm init -y
Step 1
Install dependencies:
> npm i @open-wa/wa-automate@latest openai
Step 2
Create a file called
cli.config.js
with the following code:Step 3
Run the following command in the same folder as your newly created
cli.config.js
Scan the QR code, then wait for the session to be ready. Once ready you can send the account a message and chargpt will respond to any message starting with
!
(You can eliminate this requirement by removing line 8)Enjoy!
Beta Was this translation helpful? Give feedback.
All reactions