
https://wss.lke.tencentcloud.com/v1/qbot/chat/docParseName | Type | Required or Not | Description |
session_id | string(64) | Yes | Session ID, used to identify a session (provided by an external system, it is advisable for different user clients to import different session IDs, otherwise messages from different users within the same application may get mixed up). Parameter length: 2-64 characters Verification rule: ^[a-zA-Z0-9_-]{2,64}$. You can use uuid to generate this value. uuid example: 1b9c0b03-dc83-47ac-8394-b366e3ea67ef Note: The session_id for document parsing should be consistent with the session. If a multi-round session involves multiple document uploads, the session_id must remain the same and will be validated during the session. |
bot_app_key | string(8) | Yes | Application key (provided by operations) |
request_id | string(255) | Yes | Unique request ID. Recommend using UUID to ensure uniqueness. |
cos_bucket | string | Yes | Get the cos bucket from the API response for obtaining a temporary key. |
file_type | string | Yes | File type (txt|doc|docx|pdf|ppt|pptx)
Example: txt|doc|docx|pdf|ppt|pptx |
file_name | string | Yes | File Name Example: test.docx |
cos_url | string | Yes | Platform cos path, maintain parameter consistency with the UploadPath parameter in the DescribeStorageCredential API query Example: /corp/1750375931926544384/1750376442139246592/doc/AaCIYEATBTYUQXDfXOTN-1807688648286535680.txt |
cos_hash | string | Yes | cos_hash x-cos-hash-crc64ecma Verify the consistency between the file uploaded to the cloud and the local file by checking the CRC64 code in the header. After successful upload to COS, obtain from the return header. |
e_tag | string | Yes | ETag, short for Entity Tag, is an information Tag that identifies the object content when the object is created. It can be used to check whether the content of the object has changed. After successful upload to cos, obtain it from the return header. Example value: "6886efe263f34c9f9401c2d910b02635". |
size | string | Yes | File size Note: This field is of string type. |
curl --location 'https://wss.lke.tencentcloud.com/v1/qbot/chat/docParse' \\--header 'Content-Type: application/json' \\--data '{"session_id": "<your session_id>","request_id": "<random uuid>","cos_bucket": "lke-realtime-intl-1251316161","file_type": "docx","file_name": "test.docx","cos_url": "/corp/1750375931926544384/1750376442139246592/doc/AaCIYEATBTYUQXDfXOTN-1807688648286535680.txt","e_tag": "\\"6886efe263f34c9f9401c2d910b02635\\"","cos_hash": "6138891591882964610","size": "355","bot_app_key": "<your appkey>"}'

Name | Type | Description |
session_id | string(64) | Session ID, same as the session_id when making a request |
trace_id | string | Unique ID returned |
is_final | bool | Message output completed |
doc_id | string | Document parsing API response doc_id |
process | int32 | Current progress, integer, value 100 means Successfully Ended |
status | string | Status: PARSING, SUCCESS, FAILED |
timestamp | int64 | timestamp, unit: seconds |
error_message | string | error information return on error |
{"type":"parsing","payload":{"doc_id":"0","error_message":"","is_final":false,"process":0,"session_id":"c7852s9d-aba8-4ee8-9c88-d65f28ddbc47","status":"PARSING","timestamp":1719821535,"trace_id":"1f1e5bfc9a3588d3abc62b9729fc6f62"},"message_id":"1b28b359-203e-4dbc-a103-6d92629cb1e0"}{"type":"parsing","payload":{"doc_id":"0","error_message":"","is_final":false,"process":2,"session_id":"c7852s9d-aba8-4ee8-9c88-d65f28ddbc47","status":"PARSING","timestamp":1719821535,"trace_id":"1f1e5bfc9a3588d3abc62b9729fc6f62"},"message_id":"60c2a29a-7658-4186-90a9-d81c8c0b14b4"}{"type":"parsing","payload":{"doc_id":"0","error_message":"","is_final":false,"process":85,"session_id":"c7852s9d-aba8-4ee8-9c88-d65f28ddbc47","status":"PARSING","timestamp":1719821536,"trace_id":"1f1e5bfc9a3588d3abc62b9729fc6f62"},"message_id":"65ca6da3-8909-42c4-9ea1-4a09be299a7b"}{"type":"parsing","payload":{"doc_id":"1807688654434383264","error_message":"","is_final":true,"process":100,"session_id":"c7852s9d-aba8-4ee8-9c88-d65f28ddbc47","status":"SUCCESS","timestamp":1719821536,"trace_id":"1f1e5bfc9a3588d3abc62b9729fc6f62"},"message_id":"43046854-c596-45f5-9195-3df4f82a67ff"}
https:// +{DescribeStorageCredential.Response.Bucket} +"." +{DescribeStorageCredential.Response.Type} +"." +{DescribeStorageCredential.Response.Region} +".myqcloud.com" +{DescribeStorageCredential.Response.UploadPath}
{"payload": {"request_id": "LkfnMf5IrS-4486169698","session_id": "c60f0463-0176-4c15-a236-e4cbb6c21f97","file_infos": [{"doc_id": "1833044072669409152","file_name": "Riverside Scenery","file_type": "docx","file_size": "34859","file_url": "https://lke-realtime-intl-1251316161.cos.ap-jakarta.myqcloud.com/corp/1753030485940633600/1781229014471147520/doc/xxxxxxx.docx"}],"content": ""}}
{"payload": {"request_id": "XCBLyiWwYV-9639940128","session_id": "c60f0463-0176-4c15-a236-e4cbb6c21f97","file_infos": [{"doc_id": "1833044598014003968","file_name": "test","file_type": "docx","file_size": "34859","file_url": "https://lke-realtime-intl-1251316161.cos.ap-jakarta.myqcloud.com/corp/1753030485940633600/1781229014471147520/doc/xxxxxxx.docx"}],"content": "Extract the main points from the document"}}
Feedback