repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: '💬 WhatsApp Bot' |
| #3 | --- |
| #4 | |
| #5 | ### 🚀 Getting started |
| #6 | |
| #7 | 1. Install embedchain python package: |
| #8 | |
| #9 | ```bash |
| #10 | pip install --upgrade embedchain |
| #11 | ``` |
| #12 | |
| #13 | 2. Launch your WhatsApp bot: |
| #14 | |
| #15 | <Tabs> |
| #16 | <Tab title="docker"> |
| #17 | ```bash |
| #18 | docker run --name whatsapp-bot -e OPENAI_API_KEY=sk-xxx -p 8000:8000 embedchain/whatsapp-bot |
| #19 | ``` |
| #20 | </Tab> |
| #21 | <Tab title="python"> |
| #22 | ```bash |
| #23 | python -m embedchain.bots.whatsapp --port 5000 |
| #24 | ``` |
| #25 | </Tab> |
| #26 | </Tabs> |
| #27 | |
| #28 | |
| #29 | If your bot needs to be accessible online, use your machine's public IP or DNS. Otherwise, employ a proxy server like [ngrok](https://ngrok.com/) to make your local bot accessible. |
| #30 | |
| #31 | 3. Create a free account on [Twilio](https://www.twilio.com/try-twilio) |
| #32 | - Set up a WhatsApp Sandbox in your Twilio dashboard. Access it via the left sidebar: `Messaging > Try it out > Send a WhatsApp Message`. |
| #33 | - Follow on-screen instructions to link a phone number for chatting with your bot |
| #34 | - Copy your bot's public URL, add /chat at the end, and paste it in Twilio's WhatsApp Sandbox settings under "When a message comes in". Save the settings. |
| #35 | |
| #36 | - Copy your bot's public url, append `/chat` at the end and paste it under `When a message comes in` under the `Sandbox settings` for Whatsapp in Twilio. Save your settings. |
| #37 | |
| #38 | ### 💬 How to use |
| #39 | |
| #40 | - To connect a new number or reconnect an old one in the Sandbox, follow Twilio's instructions. |
| #41 | - To include data sources, use this command: |
| #42 | ```text |
| #43 | add <url_or_text> |
| #44 | ``` |
| #45 | |
| #46 | - To ask the bot questions, just type your query: |
| #47 | ```text |
| #48 | <your-question-here> |
| #49 | ``` |
| #50 | |
| #51 | ### Example |
| #52 | |
| #53 | Here is an example of Elon Musk WhatsApp Bot that we created: |
| #54 | |
| #55 | <img src="/images/whatsapp.jpg"/> |
| #56 |