GetMemory
Retrieves the description of a specified long-term memory.
Operation description
- This operation is idempotent.
Throttling: Ensure that the interval between two consecutive requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.
Try it now
You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use the action in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
-
Action: the specific permission.
-
Access level: the access level of each operation. Valid values: Write, Read, and List.
-
Resource type: the resource types that support authorization in the operation. For more information, see the following:
- Required resource types are marked with an asterisk (*) prefix.
- For operations that do not support resource-level authorization,
All Resourcesis used.
-
Condition key: the condition keys defined by the cloud service.
-
Dependent action: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:GetMemory | get | *All Resources * |
| None |
Endpoint
/{workspaceId}/memories/{memoryId}Path parameters
workspaceIdstringRequiredThe ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see How to use workspaces.
memoryIdstringRequiredThe ID of the long-term memory, which corresponds to the memoryId returned by the CreateMemory operation.
Response fields
Schema of Response
descriptionstringThe description of the long-term memory.
memoryIdstringThe ID of the long-term memory.
requestIdstringThe request ID.
workspaceIdstringThe ID of the workspace to which the long-term memory belongs.
Response example
Success response
JSON format
{
"description": "我的大模型应用$APP_ID关于A用户的长期记忆体",
"memoryId": "6bff4f317a14442fbc9f73d29dbdxxxx",
"requestId": "6a71f2d9-f1c9-913b-818b-11402910xxxx",
"workspaceId": "llm-xxxxxxxxxxxx"
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 404 | Memory.MemoryIdNotFound | Memory Id not exist or is not authorized. | memoryId not found |
| 500 | Memory.InternalError | Memory service inner exception. | Memory service internal exception. |
See Error Center for more error codes.