๐Ÿš€ Getting started

  1. Install embedchain python package:
pip install --upgrade "embedchain[poe]"
  1. Create a free account on Poe.
  2. Click โ€œCreate Botโ€ button on top left.
  3. Give it a handle and an optional description.
  4. Select Use API.
  5. 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 to make your local bot accessible.
  6. Copy your api key and paste it in .env as POE_API_KEY.
  7. You will need to set OPENAI_API_KEY for generating embeddings and using LLM. Copy your OpenAI API key from here and paste it in .env as OPENAI_API_KEY.
  8. Now create your bot using the following code snippet.
# make sure that you have set OPENAI_API_KEY and POE_API_KEY in .env file
from embedchain.bots import PoeBot

poe_bot = PoeBot()

# add as many data sources as you want
poe_bot.add("https://en.wikipedia.org/wiki/Adam_D%27Angelo")
poe_bot.add("https://www.youtube.com/watch?v=pJQVAqmKua8")

# start the bot
# this start the poe bot server on port 8080 by default
poe_bot.start()
  1. You can paste the above in a file called your_script.py and then simply do
python your_script.py

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

  1. You can refer the Supported Data formats section to refer the supported data types in embedchain.

  2. Click Run check to make sure your machine can be reached.

  3. Make sure your bot is private if thatโ€™s what you want.

  4. Click Create bot at the bottom to finally create the bot

  5. Now your bot is created.

๐Ÿ’ฌ How to use

  • To ask the bot questions, just type your query in the Poe interface:
<your-question-here>
  • If you wish to add more data source to the bot, simply update your script and add as many .add as you like. You need to restart the server.