GetHistoryListByBizType
Retrieve conversation history records by business type.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table lists the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles permission to call this API. Details are as follows:
-
Action: refers to the 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 *.
- For operations that do not support resource-level authorization,
All Resourcesis 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 all dependent action permissions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:GetHistoryListByBizType | get | *All Resources * |
| None |
Request syntax
GET /{workspaceId}/api/history/list HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID | llm-xxxxx |
| page | integer | No | Page number | 1 |
| pageSize | integer | No | Page size | 10 |
| bizType | string | Yes | Business type. Currently supported: model Q&A (LlmChat) and document library Q&A (LibraryChat) | LibraryChat |
| bizId | string | Yes | Unique business identifier. When bizType is LibraryChat, bizId is the document library ID | GysYBsxx |
Response parameters
| Element | Type | Description | Example |
|---|---|---|---|
| object | ResultCode<PageVO > | ||
| cost | long | Time consumed | null |
| data | object | Response data | |
| currentPage | long | Current page | 1 |
| pageSize | long | Page size | 10 |
| records | array<object> | Records | |
| record | object | Data | |
| bizId | string | Business ID | GysYBsxx |
| bizType | string | Business type | LibraryChat |
| extraMessage | any | Extension information | null |
| gmtCreate | string | Creation time | 2024-01-01 00:00:00 |
| gmtModified | string | Last modified time | 2024-01-01 00:00:00 |
| id | long | History record ID | 210 |
| llmAnswer | string | LLM response | Hello. |
| llmPrompt | string | LLM prompt | Please use the following context to answer the final question.\nThe following is the context content: |
| llmType | string | LLM type | qwen-max |
| sessionId | string | Session ID | null |
| userQuery | string | User query | Who are you |
| totalPages | long | Total number of pages | 10 |
| totalRecords | long | Total number of records | 100 |
| dataType | string | Data type | null |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| requestId | string | Request ID | 9DF9B3F3-9FFE-52CB-A8DC-F7BD5F842F0E |
| success | boolean | Indicates whether the request succeeded | true |
| time | string | Timestamp | 2024-01-01 00:00:00 |
Examples
Success response
JSON format
{
"cost": 0,
"data": {
"currentPage": 1,
"pageSize": 10,
"records": [
{
"bizId": "GysYBsxx",
"bizType": "LibraryChat",
"extraMessage": null,
"gmtCreate": "2024-01-01 00:00:00",
"gmtModified": "2024-01-01 00:00:00\n",
"id": 210,
"llmAnswer": "你好。",
"llmPrompt": "请使用以下上下文来回答最后的问题。\\n以下是上下文内容:",
"llmType": "qwen-max",
"sessionId": null,
"userQuery": "你是谁"
}
],
"totalPages": 10,
"totalRecords": 100
},
"dataType": null,
"errCode": 0,
"message": "ok",
"requestId": "9DF9B3F3-9FFE-52CB-A8DC-F7BD5F842F0E",
"success": true,
"time": "2024-01-01 00:00:00"
}
Error codes
Visit the Error Center to view more error codes.