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.
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
-
Clone the repository:
git clone <repository-url> cd rag-app
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn app.main:app --reload
- The application exposes various API endpoints for interacting with the RAG functionality.
- You can access the API documentation at
http://localhost:8000/docsafter running the application.
- To run the tests, use the following command:
pytest
To build and run the application using Docker, execute the following commands:
-
Build the Docker image:
docker build -t rag-app . -
Run the Docker container:
docker run -p 8000:8000 rag-app
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.