Skip to content

Anmol-Sharma21/book-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookGPT - PDF QA System

A RAG-based question answering system for PDF documents using Groq, Pinecone, and LangChain.

API Demo Python Version

Features

  • 📄 PDF document processing and text extraction
  • 🧠 RAG (Retrieval-Augmented Generation) architecture
  • 🔍 Semantic search with Pinecone vector database
  • 🤖 LLM-powered answers using Groq's Gemma2-9b-It
  • 🚀 REST API endpoints with Flask
  • 🔒 Secure configuration with environment variables

Installation

# Clone the repository
git clone https://github.com/yourusername/book-gpt.git
cd book-gpt

# Set up virtual environment and install dependencies
make setup && make install

# Configure environment (edit with your keys)
cp .env.example .env

Usage

# Start the API server
make run

# API will be available at:
# http://localhost:5000/api/v1/

API Endpoints

Upload PDF:

curl -X POST -F "[email protected]" http://localhost:5000/api/v1/pdf/upload

Ask Question:

curl -X POST -H "Content-Type: application/json" \
-d '{"question": "Explain the Krebs cycle"}' \
http://localhost:5000/api/v1/pdf/query

Project Structure

.
├── app
│   ├── routes/          # API endpoints
│   ├── services/        # Business logic
│   └── utils/           # Configurations
├── tests
├── .env.example
├── Makefile
├── requirements.txt
└── run.py

Requirements

  • Python 3.9+
  • Pinecone API key
  • Groq API key

License

MIT License - See LICENSE for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published