Skip to content

Avyakta000/gen-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Application

This is a Retrieval-Augmented Generation (RAG) application built using FastAPI and LangChain. The application is designed to provide efficient retrieval and generation of information based on user queries.

Project Structure

rag-app
├── app
│   ├── __init__.py
│   ├── main.py
│   ├── api
│   │   ├── __init__.py
│   │   ├── endpoints.py
│   └── services
│       ├── __init__.py
│       ├── langchain_service.py
│       └── retrieval_service.py
├── models
│   ├── __init__.py
│   └── document_model.py
├── utils
│   ├── __init__.py
│   └── helpers.py
├── tests
│   ├── __init__.py
│   ├── test_endpoints.py
│   └── test_services.py
├── .gitignore
├── requirements.txt
├── README.md
└── Dockerfile

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd rag-app
  2. Create a virtual environment:

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

    pip install -r requirements.txt
  4. Run the application:

    uvicorn app.main:app --reload

Usage

  • The application exposes various API endpoints for interacting with the RAG functionality.
  • You can access the API documentation at http://localhost:8000/docs after running the application.

Testing

  • To run the tests, use the following command:
    pytest

Docker

To build and run the application using Docker, execute the following commands:

  1. Build the Docker image:

    docker build -t rag-app .
  2. Run the Docker container:

    docker run -p 8000:8000 rag-app

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors