embedchain/docs/examples/poe_bot.mdx
pip install fastapi-poe==0.0.16
Use API.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..env as POE_API_KEY.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.# 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()
your_script.py and then simply dopython your_script.py
Now your bot will start running at port 8080 by default.
You can refer the Supported Data formats section to refer the supported data types in embedchain.
Click Run check to make sure your machine can be reached.
Make sure your bot is private if that's what you want.
Click Create bot at the bottom to finally create the bot
Now your bot is created.
<your-question-here>
.add as you like. You need to restart the server.