Skip to content

This project is a collection of various applications and scripts utilizing the LangChain library for natural language processing tasks.

Notifications You must be signed in to change notification settings

devajayarora/Langchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LangChain Project

This project is a collection of various applications and scripts utilizing the LangChain library for natural language processing tasks.

Project Structure

.env .gitignore agents/ - agents.ipynb api/ - app.py - client.py chatbot/ - app_llama.py - app.py rag/ - attention.pdf - chain.ipynb - rag.ipynb - speech.txt requirements.txt

Folders and Files

  • agents/: Contains Jupyter notebooks for agent-based tasks.

    • agents.ipynb: Notebook for agent-related experiments.
  • api/: Contains the API implementation using FastAPI.

    • app.py: Main API application file. Implements routes and initializes models.
    • client.py: Client for interacting with the API.
  • chatbot/: Contains applications for chatbot implementations.

    • app_llama.py: Chatbot application using the LLaMA model.
    • app.py: Main chatbot application using Streamlit.
  • rag/: Contains resources and notebooks for retrieval-augmented generation (RAG) tasks.

    • attention.pdf: PDF document related to attention mechanisms.
    • chain.ipynb: Notebook for chain-based RAG tasks.
    • rag.ipynb: Notebook for RAG experiments.
    • speech.txt: Text file related to speech processing.
  • .env: Environment variables file.

  • .gitignore: Git ignore file.

  • requirements.txt: Python dependencies file.

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd LangChain
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Set up environment variables:

    • Copy the .env file to the root directory and update the values as needed.

Running the Applications

API

To run the FastAPI application:

cd api
uvicorn app:app --reload

Chatbot

To run the Streamlit chatbot application:

cd chatbot
streamlit run app.py

Usage

API: Access the API endpoints at http://localhost:8000.
Chatbot: Open the Streamlit application in your browser and interact with the chatbot.

About

This project is a collection of various applications and scripts utilizing the LangChain library for natural language processing tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published