DEV Community

Aymen Hmani
Aymen Hmani

Posted on • Edited on

How to Integrate Your Poe.com Ai Bot into Your Website: A Step-by-Step Guide

Introduction

This tutorial will guide you through the process of integrating your Poe.com bot into your website. By the end of this tutorial, you'll have a fully functional bot integrated into your site with a custom front-end, ready to interact with your visitors.

end result


before we begin use this template repo

template repo

and dont forget to install the librearies :

 pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

Step 1: Get the Cookies from quora.com

First things first, you'll need to grab some cookies.They are essential for your bot's authentication and functionality. Here's how to get them:

  1. Log in to quora.com: Open your web browser and navigate to Poe.com. Log in with your account credentials.

  2. Open Developer Tools: Once logged in, open the developer tools in your browser. You can do this by right-clicking on the page and selecting "Inspect" or pressing Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac).

  3. Navigate to the Application Tab: In the developer tools window, go to the "Application" tab.

  4. Locate the Cookies Section: Under the "Storage" section on the left sidebar, click on "Cookies" and select https://quora.com from the dropdown.

  5. Copy the Cookies: Find the cookies (m-b and m-lat), right-click on them, and select "Copy". Open your text editor and paste the cookies into secrets.ini .

[Tokens]
b = XXXXXXXXXXXXXXXXXXX==
lat = XXXXXXXXXXXXXXXXXX==
Enter fullscreen mode Exit fullscreen mode

coockies


Step 2: Create Your Bot in Poe.com

With the cookies saved, it's time to create your bot.

Make sure you have logged in poe.com using the same email which registered on quora.com.

Follow these steps:

  1. Navigate to the Bot Creation Page: On Poe.com, find the "Create Bot" section. This is usually located in your account dashboard.
    create bot

  2. Set Up Your Bot: Fill in the necessary details for your bot, such as its name, description, and any specific functionalities you want it to have. Don't forget to upload an avatar to give your bot some personality!
    bot form

  3. Save and Deploy: Once you've configured your bot, click on the "Save" button to finalize the creation process. Your bot is now live and ready to be integrated into your website.

  4. Add bot name to secrets.ini

[Bot]
bot_name = 5ademni_bot
Enter fullscreen mode Exit fullscreen mode

Step 3: Deploy!

  • Run app.py

native chatbot

  • integrate with your website using <iframe>

chatbot integration


Bonus Step: Knowledge Base!

Knowledge Base

You can automate editing your bot knowledge base using knowledge_update.py.

example :

this bot gets updates daily using scraped data for joblistings, using Github Actions

github actions

Thats it!

you can follow me on Github if you are interested About APIs and Ai !

You can read these docs if you want to further customize the chatbot

Top comments (1)

Collapse
 
host_bykindramyar_2e41f profile image
host by kind ramyar

hey how are you, please i need some help to add my bot to my website help me please, thank you so much