/oreilly_live_training_llm_apps

Notebooks for the live trainining about llm app development

Primary LanguageHTML

O'Reilly Live Trainining - Building Text Based Applications with the ChatGPT API and Langchain

Setup

Conda

  • Install anaconda
  • This repo was tested on a Mac with python=3.10.
  • Create an environment: conda create -n oreilly-env python=3.10
  • Activate your environment with: conda activate oreilly-env
  • Install requirements with: pip install -r requirements.txt
  • Setup your openai API key

Pip

  1. Create a Virtual Environment: Navigate to your project directory. Make sure you hvae python3.10 installed! 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:

  • pip install jupyter
  • python3 -m ipykernel install --user --name=oreilly-env

Notebooks

Here are the notebooks available in the notebooks/ folder:

  1. Intro to ChatGPT API & Prompt Basics

    Open In Colab

  2. Applying Prompt Engineering Strategies

    Open In Colab

  3. Prompt Engineering Guide

    Open In Colab

  4. Fine-tuning ChatGPT API

    Open In Colab

  5. Intro to LangChain

    Open In Colab

  6. Q&A with LangChain

    Open In Colab

  7. Quiz Generator App

    Open In Colab

  8. Notes Summarizer App

    Open In Colab

  9. General Intro to LLMs

    Open In Colab

  10. Prompt Engineering Techniques: Knowledge Generation

    Open In Colab

  11. Prompt Engineering Techniques

    Open In Colab