UpdateMemory

Updated at:

Updates the description of a specified long-term memory.

Operation description

  • This operation is idempotent.

Rate limit: Make sure that the interval between two requests is at least 1 second. Otherwise, throttling may be triggered. If throttling occurs, retry later.

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.

Debug

Authorization information

The following table describes the authorization information of the API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the 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 for the operation. Details are as follows:

    • For required resource types, an asterisk (*) is added as a prefix.
    • For operations that do not support resource-level authorization, All Resources 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 for the operation to succeed.

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

Endpoint

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

Path parameters

workspaceIdstringRequired

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 a workspace.

Example: llm-xxxxxxxxxxxx
memoryIdstringRequired

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

Example: 6bff4f317a14442fbc9f73d29dbdxxxx

Request body

descriptionstringOptional

The new description. The description must be 1~50 characters in length and can contain characters in the Unicode letter category (including English letters, Chinese characters, and digits). The description can contain half-width colons (:), underscores (_), periods (.), or hyphens (-).

Example: The long-term memory of my LLM application $APP_ID about user B

Response fields

object

Schema of Response

requestIdstring

The request ID.

Example: 6a71f2d9-f1c9-913b-818b-11402910xxxx

Response example

Success response

JSON format

{
  "requestId": "6a71f2d9-f1c9-913b-818b-11402910xxxx"
}

Error codes

HTTP status codeError codeError messageDescription
400Memory.DescriptionInvalidInput parameter description is invalid.The description of the memory is invalid
404Memory.MemoryIdNotFoundMemory Id not exist or is not authorized.memoryId not found
500Memory.InternalErrorMemory service inner exception.Memory service internal exception.

Visit the Error Center to view more error codes.