/oreilly_live_training_getting_started_with_langchain

Repo for my live-training about getting started with langchain

Primary LanguageJupyter Notebook

Notebooks for the O'Reilly live-training: "Getting Started with LangChain"

Overview

Notebooks

  1. Introduction to LangChain
  2. Composing Chain Pipelines with LangChain
  3. Introduction to LangChain Expression Language (LCEL)
  4. LangChain OpenAI Functions and Runnables with Tools
  5. QA with LangChain
  6. LangChain Query CSV
  7. LangChain QA with GPT-4
  8. LangChain QA with CSV and PDF
  9. Building LLM Agents with LangChain
  10. Conversational Agent with LangChain
  11. LangChain GitHub Agent Prototype

Setup

Conda

  • Install anaconda
  • Create an environment: conda create -n oreilly-langchain
  • Activate your environment with: conda activate oreilly-langchain
  • Install requirements with: pip install -r requirements.txt
  • Setup your openai API key

Pip

  1. Create a Virtual Environment: Navigate to your project directory. If using Python 3's built-in venv:

    python -m venv oreilly_env

    If you're using virtualenv:

    virtualenv oreilly_env
  2. Activate the Virtual Environment:

    • On Windows:
      .\oreilly_env\Scripts\activate
    • On macOS and Linux:
      source oreilly_env/bin/activate
  3. Install Dependencies from requirements.txt:

    pip install python-dotenv
    pip install -r requirements.txt
  4. Setup your openai API key

Remember to deactivate the virtual environment once you're done by simply typing:

deactivate

Setup your .env file

  • Change the .env.example file to .env and add your OpenAI API key.

To use this Environment with Jupyter Notebooks:

python3 -m ipykernel install --user --name=oreilly-langchain

Official Training Website

For more information about the live-training, visit the official website.