Correct parser_config examples in API docs (#16002)

Close #8668 
Fixes incorrect parser_config examples in the API docs.
This commit is contained in:
Ethan Yoo authored and GitHub committed 2026-09-09 21:20:52 +08:00
1 parent d5a89c324c
commit e356255ef4
2 files changed
+13 -13

No files matched your search

+4 -4
View File
@@ -1155,7 +1155,7 @@ Success:
"chunk_token_num": 128,
"delimiter": "\\n",
"html4excel": false,
"layout_recognize": true
"layout_recognize": "DeepDOC"
},
"run": "UNSTART",
"size": 17966,
@@ -1237,7 +1237,7 @@ curl --request PATCH \
The configuration settings for the dataset parser. The attributes in this JSON object vary with the selected `"chunk_method"`:
- If `"chunk_method"` is `"naive"`, the `"parser_config"` object contains the following attributes:
- `"chunk_token_num"`: Defaults to `256`.
- `"layout_recognize"`: Defaults to `true`.
- `"layout_recognize"`: Defaults to `"DeepDOC"`.
- `"html4excel"`: Indicates whether to convert Excel documents into HTML format. Defaults to `false`.
- `"delimiter"`: Defaults to `"\n"`.
- `"task_page_size"`: Defaults to `12`. For PDF only.
@@ -1479,7 +1479,7 @@ Success:
"parser_config": {
"chunk_token_count": 128,
"delimiter": "\n",
"layout_recognize": true,
"layout_recognize": "DeepDOC",
"task_page_size": 12
},
"chunk_method": "naive",
@@ -1940,7 +1940,7 @@ Success:
"chunk_token_num": 128,
"delimiter": "\\n",
"html4excel": false,
"layout_recognize": true
"layout_recognize": "DeepDOC"
},
"process_begin_at": "Thu, 24 Oct 2024 09:56:44 GMT",
"process_duration": 0.54213,
+9 -9
View File
@@ -214,9 +214,9 @@ The chunking method of the dataset to create. Available options:
The parser configuration of the dataset. A `ParserConfig` object's attributes vary based on the selected `chunk_method`:
- `chunk_method`=`"naive"`:
`{"chunk_token_num":512,"delimiter":"\\n","html4excel":False,"layout_recognize":True,"raptor":{"use_raptor":False},"parent_child":{"use_parent_child":False,"children_delimiter":"\\n"}}`.
- `chunk_method`=`"qa"`:
- `chunk_method`=`"naive"`:
`{"chunk_token_num":512,"delimiter":"\n","html4excel":False,"layout_recognize":"DeepDOC","raptor":{"use_raptor":False},"parent_child":{"use_parent_child":False,"children_delimiter":"\n"}}`.
- `chunk_method`=`"qa"`:
`{"raptor": {"use_raptor": False}}`
- `chunk_method`=`"manual"`:
`{"raptor": {"use_raptor": False}}`
@@ -511,9 +511,9 @@ A dictionary representing the attributes to update, with the following keys:
- `"one"`: One
- `"email"`: Email
- `"parser_config"`: `dict[str, Any]` The parsing configuration for the document. Its attributes vary based on the selected `"chunk_method"`:
- `"chunk_method"`=`"naive"`:
`{"chunk_token_num":128,"delimiter":"\\n","html4excel":False,"layout_recognize":True,"raptor":{"use_raptor":False},"parent_child":{"use_parent_child":False,"children_delimiter":"\\n"}}`.
- `chunk_method`=`"qa"`:
- `"chunk_method"`=`"naive"`:
`{"chunk_token_num":128,"delimiter":"\n","html4excel":False,"layout_recognize":"DeepDOC","raptor":{"use_raptor":False},"parent_child":{"use_parent_child":False,"children_delimiter":"\n"}}`.
- `chunk_method`=`"qa"`:
`{"raptor": {"use_raptor": False}}`
- `chunk_method`=`"manual"`:
`{"raptor": {"use_raptor": False}}`
@@ -681,9 +681,9 @@ A `Document` object contains the following attributes:
- `"FAIL"`
- `status`: `string` Reserved for future use.
- `parser_config`: `ParserConfig` Configuration object for the parser. Its attributes vary based on the selected `chunk_method`:
- `chunk_method`=`"naive"`:
`{"chunk_token_num":128,"delimiter":"\\n","html4excel":False,"layout_recognize":True,"raptor":{"use_raptor":False}}`.
- `chunk_method`=`"qa"`:
- `chunk_method`=`"naive"`:
`{"chunk_token_num":128,"delimiter":"\n","html4excel":False,"layout_recognize":"DeepDOC","raptor":{"use_raptor":False}}`.
- `chunk_method`=`"qa"`:
`{"raptor": {"use_raptor": False}}`
- `chunk_method`=`"manual"`:
`{"raptor": {"use_raptor": False}}`