How faizanahmad3/lawgpt_api works
Project type and purpose
• From the file tree and README title “LawGPT_api,” this is a standalone Python-based backend API service. Its purpose is to load or index legal documents (PDFs) and expose endpoints that leverage a GPT-based model (probably via an external OpenAI API) to answer legal queries or process legal text.
File structure
• Top-level files:
• main.py – application entrypoint, likely defines the HTTP server and routes
• Classes.py – domain or business-logic classes (e.g., PDF loader, query handler)
• utilities.py – helper functions (e.g., PDF parsing, text cleaning, embedding)
• requirements.txt – lists Python dependencies (e.g., FastAPI or Flask, OpenAI SDK, PDF libraries)
• .env – environment variables (e.g., API keys, model settings)
• pdfs_demo/ – sample legal PDF files used for testing or demonstration
• No obvious database directory; PDF files are kept in-filesystem for now.
README for additional insights
1. Exposes an HTTP API
2. Reads and processes legal PDFs
3. Sends text to GPT
4. Returns responses to the client
Detail
• Call out the .env config loader feeding into runtime
• Sample PDFs folder as a mounted volume or data directory
• Which Python dependencies live in which module (e.g., PDF parser in utilities, OpenAI SDK in business logic)