◐ Shell
clean mode source ↗

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 the gpt-5.5 models, matching the updated article step by step (source_code_step_1source_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 own data/reviews.csv (it only needs the reviews). CSV URLs in the article and README now point to langchain-rag-app/data/.
  • Removed the committed chroma_data/ vector-store artifact (it's regenerated by create_retriever.py) and added a .gitignore.
  • requirements.txt in every step, pinned consistently with each pyproject.toml and 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 format and ruff check both pass.

🤖 Generated with Claude Code