Updates a memory fragment.
Try it now
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.
Try it now
RAM authorization
The following table describes the authorization information of this API. You can use it in the Action element of a RAM policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
- Operation: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is added before them.
- For operations that do not support resource-level authorization,
All resourcesis displayed.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent operation: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent operations for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent operation |
|---|---|---|---|---|
| sfm:UpdateMemoryNode | update | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | The workspace ID. | llm-us9hjmt32nysdm5v |
| memoryId | string | Yes | The long-term memory ID. | 6bff4f317a14442fbc9f73d29dbd5fc3 |
| memoryNodeId | string | Yes | The memory fragment ID. | 68de06c95368463a8be4a84efc872cc5 |
| content | string | Yes | The memory fragment content. | The user likes tomato and egg stir-fry |
Response elements
| Element | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | The request ID. | 8C56C7AF-6573-19CE-B018-E05E1EDCF4C5 |
Examples
Success response
JSON format
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Memory.MemoryNodeContentInvalid | Memory node content is invalid. | The long-term memory node content is invalid. |
| 404 | Memory.MemoryIdNotFound | Memory Id not exist or is not authorized. | memoryId not found |
| 404 | Memory.MemoryNodeNotFound | MemoryNode not found. | The long-term memory node is not found. |
| 500 | Memory.InternalError | Memory service inner exception. | Internal error of the long-term memory service. |