From 6fd95080170a81ff126fe67e3b7ca457d7658d14 Mon Sep 17 00:00:00 2001 From: writinwaters <93570324+writinwaters@users.noreply.github.com> Date: Tue, 14 Oct 2025 13:40:56 +0800 Subject: [PATCH] Docs: Updated parse_documents (#10536) ### What problem does this PR solve? ### Type of change - [x] Documentation Update --- docs/references/python_api_reference.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/references/python_api_reference.md b/docs/references/python_api_reference.md index ba29fa425..6b8e15485 100644 --- a/docs/references/python_api_reference.md +++ b/docs/references/python_api_reference.md @@ -704,10 +704,9 @@ print("Async bulk parsing initiated.") DataSet.parse_documents(document_ids: list[str]) -> list[tuple[str, str, int, int]] ``` -Parses documents **synchronously** in the current dataset. -This method wraps `async_parse_documents()` and automatically waits for all parsing tasks to complete. -It returns detailed parsing results, including the status and statistics for each document. -If interrupted by the user (e.g. `Ctrl+C`), all pending parsing jobs will be cancelled gracefully. +*Asynchronously* parses documents in the current dataset. + +This method encapsulates `async_parse_documents()`. It awaits the completion of all parsing tasks before returning detailed results, including the parsing status and statistics for each document. If a keyboard interruption occurs (e.g., `Ctrl+C`), all pending parsing tasks will be cancelled gracefully. #### Parameters @@ -717,16 +716,17 @@ The IDs of the documents to parse. #### Returns -A list of tuples with detailed parsing results: +A list of tuples with detailed parsing results: + ```python [ (document_id: str, status: str, chunk_count: int, token_count: int), ... ] ``` -- **status** — Final parsing state (`success`, `failed`, `cancelled`, etc.) -- **chunk_count** — Number of content chunks created for the document. -- **token_count** — Total number of tokens processed. +- `status`: The final parsing state (e.g., `success`, `failed`, `cancelled`). +- `chunk_count`: The number of content chunks created from the document. +- `token_count`: The total number of tokens processed. ---