Files
pragativeer-v2/backend/pdf_parser.py

22 lines
774 B
Python

"""
pdf_parser.py — PDF-to-Question AI Parser
STATUS: DEFERRED — Phase 2 (AI Coach LLM integration)
This module will use PyMuPDF to extract text from uploaded PDFs and pass it
to an LLM to structure questions into the database JSON schema.
When ready to enable:
1. Add `PyMuPDF==1.23.26` and `openai==1.14.0` back to requirements.txt
2. Set LLM_BASE_URL, LLM_MODEL_NAME, OPENAI_API_KEY in backend/.env
3. Replace this stub with the full implementation.
"""
from typing import List, Dict, Any
async def parse_pdf_to_questions(pdf_bytes: bytes, exam_pattern: str) -> List[Dict[str, Any]]:
"""
Stub: returns empty list. Real implementation uses PyMuPDF + LLM JSON extraction.
Replace in Phase 2 once LLM infrastructure is provisioned.
"""
return []