Add FastAPI server for PageIndex document indexing service#221
Closed
MASLER1987 wants to merge 1 commit intoVectifyAI:mainfrom
Closed
Add FastAPI server for PageIndex document indexing service#221MASLER1987 wants to merge 1 commit intoVectifyAI:mainfrom
MASLER1987 wants to merge 1 commit intoVectifyAI:mainfrom
Conversation
Wraps PageIndexClient in a REST API (index, retrieve, structure, pages) with Dockerfile and railway.toml for one-click Railway deployment. https://claude.ai/code/session_01DC8ofq5uXQoG63AMnHNMEw
Author
|
sorry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a FastAPI-based REST API server for the PageIndex document indexing and retrieval system, along with Docker containerization support.
Key Changes
New FastAPI server (
server.py): Implements a REST API with the following endpoints:GET /health- Health check endpointGET /documents- List all indexed documents with metadataPOST /index- Upload and index PDF or Markdown filesGET /documents/{doc_id}- Retrieve document metadataGET /documents/{doc_id}/structure- Get document tree structureGET /documents/{doc_id}/pages- Get page content with flexible page range selection (e.g., '5-7', '3,8', '12')Docker support: Added
Dockerfilefor containerized deployment with Python 3.11-slim base imageRailway deployment config (
railway.toml): Configured for Railway.app deployment with health checks and restart policiesDependencies: Updated
requirements.txtto include FastAPI, Uvicorn, and python-multipart for the new server functionalityImplementation Details
https://claude.ai/code/session_01DC8ofq5uXQoG63AMnHNMEw