RAG API
This document outlines the API endpoints for managing Retrieval-Augmented Generation (RAG) components in PySpur.Document Collections
Create Document Collection
Description: Creates a new document collection from uploaded files and metadata. The files are processed asynchronously in the background. URL:/rag/collections/
Method: POST
Form Data:
metadata
is a JSON string representing:
List Document Collections
Description: Lists all document collections. URL:/rag/collections/
Method: GET
Response Schema:
Get Document Collection
Description: Gets details of a specific document collection. URL:/rag/collections/{collection_id}/
Method: GET
Parameters:
Delete Document Collection
Description: Deletes a document collection and its associated data. URL:/rag/collections/{collection_id}/
Method: DELETE
Parameters:
Get Collection Progress
Description: Gets the processing progress of a document collection. URL:/rag/collections/{collection_id}/progress/
Method: GET
Parameters:
Add Documents to Collection
Description: Adds documents to an existing collection. The documents are processed asynchronously in the background. URL:/rag/collections/{collection_id}/documents/
Method: POST
Parameters:
Get Collection Documents
Description: Gets all documents and their chunks for a collection. URL:/rag/collections/{collection_id}/documents/
Method: GET
Parameters:
DocumentWithChunksSchema
contains:
Delete Document from Collection
Description: Deletes a document from a collection. URL:/rag/collections/{collection_id}/documents/{document_id}/
Method: DELETE
Parameters:
Preview Chunk
Description: Previews how a document would be chunked with a given configuration. URL:/rag/collections/preview_chunk/
Method: POST
Form Data:
Vector Indices
Create Vector Index
Description: Creates a new vector index from a document collection. The index is created asynchronously in the background. URL:/rag/indices/
Method: POST
Request Payload:
List Vector Indices
Description: Lists all vector indices. URL:/rag/indices/
Method: GET
Response Schema:
Get Vector Index
Description: Gets details of a specific vector index. URL:/rag/indices/{index_id}/
Method: GET
Parameters:
Delete Vector Index
Description: Deletes a vector index and its associated data. URL:/rag/indices/{index_id}/
Method: DELETE
Parameters:
Get Index Progress
Description: Gets the processing progress of a vector index. URL:/rag/indices/{index_id}/progress/
Method: GET
Parameters:
Retrieve from Index
Description: Retrieves relevant chunks from a vector index based on a query. URL:/rag/indices/{index_id}/retrieve/
Method: POST
Parameters:
RetrievalResultSchema
contains: