Create a Chatbot from Website Data
In this tutorial, we will show you how to create a chatbot by scraping data from a website, transforming web pages into embeddings, and storing them in a database. This ensures that the most relevant pages are always included in the chat model context, effectively transforming a website into an interactive chatbot. Let's get started!
1. Navigate to the Create App Section
First, log in to your OpenKBS account and navigate to the Create App section from the sidebar.
2. Create New App
Fill in the required details for your new app, such as the app title, description, and model instructions. Select the appropriate chat model and tools, then click 'Create'.
3. Configure Items API
Navigate to the 'Items' tab and configure the search engine, embedding model, and embedding dimensions. Click 'Enable Items API' to proceed.
4. Import Web Pages
Under the 'Items' tab, select 'Import web pages' from the 'Actions' dropdown.
5. Enter you website
Enter the website URL or sitemap and click 'Next'.
6. Choose sitemap
Then choose the sitemap you want to index and press 'Next' again.
7. Select URLs and Extract Pages
Select the URLs and click 'Filter URLs'. Review the filtered URLs, then click 'Next' to extract web pages.
8. Review and process Pages
Review extracted pages, then click 'Process Pages'.
9. Save to Database
Once the pages are processed, click 'Save to database' to store the data.
10. Start Using Your Web Assistant
Congratulations! You've successfully created your web assistant. Navigate to the 'Chat' tab and start a new chat to interact with your web assistant. Enjoy your new AI-powered assistant and watch it transform your website experience!