Skip to content

Deep dive into LangChain building blocks: prompts, chat models (Gemini), output parsers, text splitters, embeddings/vector stores, retrievers, LCEL piping, and a tool-using agent.

Notifications You must be signed in to change notification settings

DrParthaMajumder/L4-Components-Langchain

Repository files navigation

L4 - Components

Overview

Deep dive into LangChain building blocks: prompts, chat models (Gemini), output parsers, text splitters, embeddings/vector stores, retrievers, LCEL piping, and a tool-using agent.

Contents

  • [langchain_components.ipynb]
  • [ex1.ipynb]
  • [ex2.ipynb]
  • [ex3.ipynb]

Setup

  • Environment variable: set GOOGLE_API_KEY (e.g., via a local .env).
  • Install:
    • pip install langchain langchain-google-genai langchain-text-splitters langchain-community faiss-cpu python-dotenv numexpr pytz

How to Use

  • Open notebooks in Jupyter and run cells top‑to‑bottom.
  • Start with langchain_components.ipynb, then try ex1ex2ex3.
  • If a cell needs API access, ensure GOOGLE_API_KEY is set and restart the kernel.

Models

  • Recommended: gemini-2.5-flash
  • Fallbacks (if not enabled): gemini-1.5-pro, gemini-1.5-flash

Exporting (optional)

  • HTML: jupyter nbconvert --to html langchain_components.ipynb
  • PDF (Chromium): jupyter nbconvert --to webpdf langchain_components.ipynb --WebPDFExporter.allow_chromium_download=True

Developer

  • Dr. Partha Majumder

About

Deep dive into LangChain building blocks: prompts, chat models (Gemini), output parsers, text splitters, embeddings/vector stores, retrievers, LCEL piping, and a tool-using agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published