banner
endercat

endercat

某个白嫖怪的分享博客 现已迁移到 https://endercat.eu.org 请前往该URL查看最新文章
bilibili
github
telegram

xlog-Archivist: Making it easier to add articles to the knowledge base

In the previous article, we introduced how to make the ChatGPT bot reply based on the content of the article by adding blog content to the knowledge base. However, the method of manually copying article content is inefficient and very inconvenient to use.

Embedding ChatGPT that can read articles on blogs

To solve this problem, I developed a project called xlog-Archivist.
xlog-Archivist is a tool for automatically crawling article content and URLs from xlog-based blogs. With xlog-Archivist, we don't need to manually copy article content, it can automatically retrieve article content and export it in JSON format, making it easy for us to migrate blog content to the ChatGPT knowledge base. This greatly simplifies the process of knowledge acquisition, allowing the ChatGPT bot to learn and accumulate knowledge more quickly based on new content.

Usage#

  1. Clone the project locally or download the zip
    git clone https://github.com/endercatone/xlog-Archivist.git
    
  2. Install dependencies
    pip install requests
    
  3. Run the program
    python main.py
    

Now you should be able to find articles and url.txt in the articles directory
image-20230521021418044
After the first run, your blog URL will be saved in the configuration file, so you don't have to enter the URL next time.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.