Coder Social home page Coder Social logo

abedkhooli / dlai-langchain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amjadraza/dlai-langchain

0.0 0.0 0.0 71.81 MB

A repository with collection of learning resources about LangChain Course offered by DeepLearning.ai

License: MIT License

Jupyter Notebook 99.92% Dockerfile 0.08%

dlai-langchain's Introduction

📖 DLAI LANGCHAIN

A collection of notebooks for the course DLAI LangChain for LLM Applications & Chat with Data with local environment setup

Learning Objectives

  • Learn the fundamentals of LLM and LangChain toolkits.
  • Understand the prompt and Chains
  • Understand how to develop the Chat with Data Applications with LangChain

🔧 Features

  • Collection of Notebooks
  • Local venev setup using Poetry
  • Docker Support with Optimisation Cache etc
  • Run the Notebook Server with Docker

This repo contains

  1. notebooks\langchain : LangChain for LLM Application Development
  2. notebooks\chat-data : LangChain: Chat with Your Data

💻 Generate API Key for LAMINI

  1. Sign up on https://platform.openai.com/
  2. Generate OpenAI API keys
  3. dotenv can also be used to setup the key. Use the env.example to create env file

💻 Running Locally

  1. Clone the repository📂
git clone https://github.com/amjadraza/dlai-langchain.git
  1. Install dependencies with Poetry and activate virtual environment🔨
poetry install
poetry shell
  1. Copy and Modify env.example to .env

Generate the HF API Key to be able to hosted models for inference and set the variables accordingly.

  1. Run the JupyterLab server🚀
jupyter lab

Run Notebooks using Docker

This project includes Dockerfile to run the app in Docker container. In order to optimise the Docker Image size and building time with cache techniques, I have follow tricks in below Article https://medium.com/@albertazzir/blazing-fast-python-docker-builds-with-poetry-a78a66f5aed0

Build the docker container

docker build . -t dlai-langchain:latest

To generate Image with DOCKER_BUILDKIT, follow below command

DOCKER_BUILDKIT=1 docker build --target=runtime . -t dlai-langchain:latest

  1. Run the docker container directly

docker run -d --name dlai-langchain -p 8888:8888 dlai-langchain:latest

  1. Run the docker container using docker-compose (Recommended)

docker-compose up

Make sure to include the .env SECRETS file when running with docker-compose with your own Keys.

Report Feedbacks

As dlai-hf-course:latest is a template project with minimal example. Report issues if you face any.

DISCLAIMER & CREDITS

We have collected the Notebooks from original course and edited for few lines/functions to make them run locally.

We must give credit to Course Instructores Harrison Chase

dlai-langchain's People

Contributors

amjadraza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.