Skip to content

FastAPI app for secure PDF analysis and AI-powered question answering using OpenAI GPT and FAISS for semantic search.

License

Notifications You must be signed in to change notification settings

s2010/PDF-Analyst-AI-Agent

Repository files navigation

PDF Document Processor

A FastAPI-based document processing service that extracts text from PDF files and enables semantic search capabilities.

Features

  • PDF text extraction and processing
  • Semantic search with vector embeddings
  • RESTful API with automatic documentation
  • Rate limiting and security controls
  • Persistent vector storage

Quick Start

  1. Setup Environment

    cp .env.example .env
    # Edit .env with your OpenAI API key
  2. Run with Docker

    docker-compose up --build
  3. Access API

API Endpoints

  • POST /api/upload - Upload PDF documents
  • POST /api/ask - Query document content
  • GET /api/status - System status
  • GET /health - Health check

Configuration

Configure via environment variables in .env:

  • OPENAI_API_KEY - Required for embeddings
  • MAX_FILE_SIZE - Maximum file size (default: 50MB)
  • MAX_PDF_PAGES - Maximum pages per document (default: 500)

License

MIT License

About

FastAPI app for secure PDF analysis and AI-powered question answering using OpenAI GPT and FAISS for semantic search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published