UpdateQaLibrary
Updates a Q&A library. After the update, use the GenDocQaResult API to parse the Q&A pairs.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the API runs successfully, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
-
Action: refers to a specific permission point.
-
Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
全部资源is used.
-
Condition key: refers to the condition keys defined by the cloud service itself.
-
Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions before the operation can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:UpdateQaLibrary | create | *All resources * |
| None |
Request syntax
POST /{workspaceId}/api/virtualHuman/qa/upload HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID | llm-xxxx |
| body | object | No | Request body | |
| parseQaResults | array<object> | Yes | A list of Q&A results parsed from Q&A parsing | |
| parseQaResult | object | No | A Q&A result parsed from Q&A parsing | |
| question | string | Yes | Question | What is the net weight of this **glutinous rice large shaomai? |
| answer | string | Yes | Answer | The net weight of this **glutinous rice large shaomai is 900g. |
| qaLibraryId | string | No | Q&A library ID | 6jh378d |
| requestId | string | Yes | Request ID | 0FC6636E-380A-5369-AE01-D1C15BB9B254 |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | ResultCode | ||
| success | boolean | Indicates whether the request was successful | true |
| dataType | string | Data type | null |
| time | string | Timestamp | 2024-04-24 11:54:34 |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| data | object | Response data | |
| qaLibraryId | string | Q&A library ID | 6jh378d |
| requestId | string | Request ID | EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258 |
| cost | long | Time consumed | null |
Examples
Success response
JSON format
{
"success": true,
"dataType": null,
"time": "2024-04-24 11:54:34",
"errCode": 0,
"message": "ok",
"data": {
"qaLibraryId": "6jh378d"
},
"requestId": "EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258",
"cost": 0
}
Error codes
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|
No change history yet.