mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
API: Stop parsing (#1556)
### What problem does this PR solve? Aims to stop the process of parsing. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -157,6 +157,17 @@ class RAGFlow:
|
||||
return res.json()
|
||||
|
||||
# ----------------------------stop parsing-----------------------------------------------------
|
||||
def stop_parsing_document(self, dataset_id, document_id):
|
||||
endpoint = f"{self.dataset_url}/{dataset_id}/documents/{document_id}/status"
|
||||
res = requests.delete(endpoint, headers=self.authorization_header)
|
||||
|
||||
return res.json()
|
||||
|
||||
def stop_parsing_documents(self, dataset_id, doc_ids=None):
|
||||
endpoint = f"{self.dataset_url}/{dataset_id}/documents/status"
|
||||
res = requests.delete(endpoint, headers=self.authorization_header, json={"doc_ids": doc_ids})
|
||||
|
||||
return res.json()
|
||||
|
||||
# ----------------------------show the status of the file-----------------------------------------------------
|
||||
def show_parsing_status(self, dataset_id, document_id):
|
||||
|
||||
Reference in New Issue
Block a user