API Documentation (#1526)

### What problem does this PR solve?

Adds the doc for the newly added API method.

### Type of change


- [x] Documentation Update
This commit is contained in:
cecilia-uu
2024-07-16 18:07:17 +08:00
committed by GitHub
parent 13389be3f4
commit 9e1421b77c
3 changed files with 352 additions and 4 deletions

View File

@ -768,7 +768,10 @@ def show_parsing_status(dataset_id, document_id):
_, doc = DocumentService.get_by_id(document_id) # get doc object
doc_attributes = doc.to_dict()
return construct_json_result(data={"progress": doc_attributes["progress"], "status": doc_attributes["status"]}, code=RetCode.SUCCESS)
return construct_json_result(
data={"progress": doc_attributes["progress"], "status": TaskStatus(doc_attributes["status"]).name},
code=RetCode.SUCCESS
)
except Exception as e:
return construct_error_response(e)
# ----------------------------list the chunks of the file-----------------------------------------------------