Skip to content

Commit

Permalink
fix: update Poe bot docs (mem0ai#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
taranjeet authored Sep 5, 2023
1 parent 3059e96 commit 794e514
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions docs/examples/poe_bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ pip install "embedchain[poe]"
5. Select `Use API`.
6. Under `API URL` enter your server or ngrok address. You can use your machine's public IP or DNS. Otherwise, employ a proxy server like [ngrok](https://ngrok.com/) to make your local bot accessible.
7. Copy your api key and paste it in `.env` as `POE_API_KEY`.
8. Now create your bot using the following code snippet
8. You will need to set `OPENAI_API_KEY` for generating embeddings and using LLM. Copy your OpenAI API key from [here](https://platform.openai.com/account/api-keys) and paste it in `.env` as `OPENAI_API_KEY`.
9. Now create your bot using the following code snippet.

```bash
from embedchain import PoeBot
# make sure that you have set OPENAI_API_KEY and POE_API_KEY in .env file
from embedchain.bots import PoeBot

poe_bot = PoeBot()

Expand All @@ -32,12 +34,20 @@ poe_bot.add("https://www.youtube.com/watch?v=pJQVAqmKua8")
poe_bot.start()
```

9. You can refer the [Supported Data formats](https://docs.embedchain.ai/advanced/data_types) section to refer the supported data types in embedchain.
10. You can paste the above in a file called `your_script.py` and then simply do

10. Click `Run check` to make sure your machine can be reached.
11. Make sure your bot is private if that's what you want.
12. Click `Create bot` at the bottom to finally create the bot
13. Now you bot is created.
```bash
python your_script.py
```

Now your bot will start running at port `8080` by default.

11. You can refer the [Supported Data formats](https://docs.embedchain.ai/advanced/data_types) section to refer the supported data types in embedchain.

12. Click `Run check` to make sure your machine can be reached.
13. Make sure your bot is private if that's what you want.
14. Click `Create bot` at the bottom to finally create the bot
15. Now you bot is created.

### 💬 How to use

Expand Down

0 comments on commit 794e514

Please sign in to comment.