Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes: "langchain.readthedocs.io" -> "python.langchain.com", else it only downloads a single index.html #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,4 @@ dmypy.json

vectorstore.pkl
langchain.readthedocs.io/
python.langchain.com/
7 changes: 7 additions & 0 deletions ingest.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off
rem Batch script to ingest data
rem This involves scraping the data from the web and then cleaning up and putting in Weaviate.
wget -r -A.html https://python.langchain.com/en/latest/
if %errorlevel% neq 0 exit /b %errorlevel%
python3 ingest.py
if %errorlevel% neq 0 exit /b %errorlevel%
2 changes: 1 addition & 1 deletion ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def ingest_docs():
"""Get documents from web pages."""
loader = ReadTheDocsLoader("langchain.readthedocs.io/en/latest/")
loader = ReadTheDocsLoader("python.langchain.com/en/latest/")
raw_documents = loader.load()
text_splitter = RecursiveCharacterTextSplitter(
chunk_size=1000,
Expand Down
2 changes: 1 addition & 1 deletion ingest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# This involves scraping the data from the web and then cleaning up and putting in Weaviate.
# Error if any command fails
set -e
wget -r -A.html https://langchain.readthedocs.io/en/latest/
wget -r -A.html https://python.langchain.com/en/latest/
python3 ingest.py