ReadTheDocs 文档
Read the Docs 是一个开源免费的软件文档托管平台。它使用
Sphinx文档生成器生成文档。
这个笔记本介绍了如何加载由Read-The-Docs构建生成的HTML内容。
对于一个实际的示例,请参阅这里。
这假设HTML内容已经被抓取到一个文件夹中。可以通过取消注释并运行以下命令来完成此操作。
%pip install --upgrade --quiet beautifulsoup4
#!wget -r -A.html -P rtdocs https://python.langchain.com/en/latest/
from langchain_community.document_loaders import ReadTheDocsLoader
API 参考:ReadTheDocsLoader
loader = ReadTheDocsLoader("rtdocs")
docs = loader.load()