GetMemory

Updated at:

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.

Try it now

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 Resources is 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.

ActionAccess levelResource typeCondition keyDependent action
sfm:GetMemoryget
*All Resources
*
    None
None

Request syntax

GET /{workspaceId}/memories/{memoryId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
workspaceIdstringYes

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
memoryIdstringYes

The ID of the long-term memory, which corresponds to the memoryId returned by the CreateMemory operation.

6bff4f317a14442fbc9f73d29dbxxxx

Response elements

ElementTypeDescriptionExample
object

Schema of Response

descriptionstring

The description of the long-term memory.

The long-term memory of my LLM application $APP_ID about user A
memoryIdstring

The ID of the long-term memory.

6bff4f317a14442fbc9f73d29dbdxxxx
requestIdstring

The request ID.

6a71f2d9-f1c9-913b-818b-11402910xxxx
workspaceIdstring

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 codeError codeError messageDescription
404Memory.MemoryIdNotFoundMemory Id not exist or is not authorized.memoryId not found
500Memory.InternalErrorMemory service inner exception.Memory service internal exception.

See Error Center for more error codes.