This repository contains an API that leverages a Large Language Model (LLM) to provide relevant answers to user queries based on text data stored in a vector database.
- Create a virtual environment:
python -m venv venv - Activate the virtual environment:
source venv/bin/activate(Linux/Mac) orvenv\Scripts\activate(Windows) - Install dependencies:
pip install -r requirements.txt - Load your environment variables:
cp .env.example .env(Linux/Mac) orcopy .env.example .env(Windows)
- Fill in the required API keys in the code.
- Add your txt file in '/Data' folder.
- Run the FastAPI application:
uvicorn main:app --reload - Visit
http://127.0.0.1:8000/docsin your browser to interact with the API using Swagger documentation.
Create a .env file and add the following:
PINECONE_API_KEY=your_pinecone_api_key
OPENAI_API_KEY=your_openai_api_key