Update sample code for the article on LangChain chatbot by lpozo · Pull Request #778 · realpython/materials
Updates the langchain-rag-app sample code to match the refreshed Build an LLM RAG Chatbot With LangChain tutorial.
What changed
- Modernized all step code to LangChain 1.x (
create_agent,langchain-neo4j, …) and thegpt-5.5models, matching the updated article step by step (source_code_step_1…source_code_final). - De-duplicated the data: extracted the shared hospital CSVs into a single top-level
data/folder and removed the per-step copies. Step 1 keeps its owndata/reviews.csv(it only needs the reviews). CSV URLs in the article and README now point tolangchain-rag-app/data/. - Removed the committed
chroma_data/vector-store artifact (it's regenerated bycreate_retriever.py) and added a.gitignore. requirements.txtin every step, pinned consistently with eachpyproject.tomland the article, using the latest releases (openai==2.41.0,uvicorn==0.49.0,polars==1.41.2,httpx==0.28.1).- README updated (CSV URLs, model names,
CHATBOT_URL). ruff formatandruff checkboth pass.
🤖 Generated with Claude Code