public interface DocumentApi
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<DocumentObject> |
createDocument(okhttp3.MultipartBody document)
Create and upload a new document to knowledge base with automatic processing
Uploads document content for intelligent processing, content extraction, and
vectorization Supports multiple file formats (PDF, DOC, TXT, MD) with automatic
format detection Features automatic text chunking, embedding generation, and
semantic indexing for optimal retrieval
|
io.reactivex.Single<retrofit2.Response<Void>> |
deleteDocument(String documentId)
Delete a document from knowledge base with complete cleanup Permanently removes the
document, its indexed content, generated embeddings, and all associated metadata
Ensures complete removal from vector database and search indices for data
consistency Irreversible operation that affects knowledge base search and retrieval
capabilities
|
io.reactivex.Single<retrofit2.Response<Void>> |
modifyDocument(String documentId,
DocumentEditParams documentEditParams)
Modify an existing document with intelligent reprocessing Updates document
metadata, content, or processing settings with automatic re-indexing Supports
content updates, metadata changes, and processing parameter adjustments Triggers
automatic re-vectorization and re-indexing when content is modified
|
io.reactivex.Single<DocumentPage> |
queryDocumentList(String knowledgeId,
String purpose,
Integer page,
Integer limit,
String order)
Query and list documents with advanced filtering and pagination Retrieves documents
from knowledge base with comprehensive filter options and sorting Supports
filtering by knowledge base, purpose, processing status, and content type Provides
efficient pagination for large document collections with optimized performance
|
io.reactivex.Single<DocumentData> |
retrieveDocument(String documentId)
Retrieve comprehensive information about a specific document Gets detailed document
data including content, processing status, embedding information, and usage
statistics Provides insights into document processing results, chunk distribution,
and retrieval performance Essential for monitoring document quality and
troubleshooting knowledge base issues
|
@POST(value="files") io.reactivex.Single<DocumentObject> createDocument(@Body okhttp3.MultipartBody document)
document - Multipart document data including file content, metadata, and
processing preferences@PUT(value="document/{document_id}")
io.reactivex.Single<retrofit2.Response<Void>> modifyDocument(@Path(value="document_id")
String documentId,
@Body
DocumentEditParams documentEditParams)
documentId - Unique identifier of the document to modifydocumentEditParams - Updated document parameters including content, metadata,
and processing settings@DELETE(value="document/{document_id}")
io.reactivex.Single<retrofit2.Response<Void>> deleteDocument(@Path(value="document_id")
String documentId)
documentId - Unique identifier of the document to delete@GET(value="files") io.reactivex.Single<DocumentPage> queryDocumentList(@Query(value="knowledge_id") String knowledgeId, @Query(value="purpose") String purpose, @Query(value="page") Integer page, @Query(value="limit") Integer limit, @Query(value="order") String order)
knowledgeId - Filter documents by specific knowledge base ID (optional)purpose - Filter documents by their intended purpose or category (optional)page - Page number for pagination (starts from 1)limit - Maximum number of documents to return per page (recommended: 10-50)order - Sort order for the document list (e.g., 'created_at', 'updated_at',
'name')@GET(value="document/{document_id}")
io.reactivex.Single<DocumentData> retrieveDocument(@Path(value="document_id")
String documentId)
documentId - Unique identifier of the document to retrieveCopyright © 2025. All rights reserved.