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 |
Request syntax
GET /{workspaceId}/memories/{memoryId} HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The 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. | llm-3z7uw7fwz0vexxxx |
| memoryId | string | Yes | The ID of the long-term memory, which corresponds to the | 6bff4f317a14442fbc9f73d29dbxxxx |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| description | string | The description of the long-term memory. | The long-term memory of my LLM application $APP_ID about user A |
| memoryId | string | The ID of the long-term memory. | 6bff4f317a14442fbc9f73d29dbdxxxx |
| requestId | string | The request ID. | 6a71f2d9-f1c9-913b-818b-11402910xxxx |
| workspaceId | string | The ID of the workspace to which the long-term memory belongs. | llm-3z7uw7fwz0vexxxx |
Examples
Success response
JSON format
{
"description": "我的大模型应用$APP_ID关于A用户的长期记忆体",
"memoryId": "6bff4f317a14442fbc9f73d29dbdxxxx",
"requestId": "6a71f2d9-f1c9-913b-818b-11402910xxxx",
"workspaceId": "llm-3z7uw7fwz0vexxxx"
}
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.