Skip to main content

GetMemoryNode

Retrieves a memory fragment.

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

RAM authorization

The following table describes the authorization information for 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:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the action. Details are as follows:
    • For required resource types, an asterisk (*) prefix is used.
    • For operations that do not support resource-level authorization, All Resources is used.
  • Condition key: the condition keys defined by the cloud product itself.
  • Dependent action: other permissions required to successfully perform the action. The caller must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
sfm:GetMemoryNodeget
*All Resources
*
    None
None

Request syntax

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

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The workspace ID.

llm-us9hjmt32nysdm5v
memoryIdstringYes

The long-term memory ID.

6bff4f317a14442fbc9f73d29dbd5fc3
memoryNodeIdstringYes

The memory fragment ID.

68de06c95368463a8be4a84efc872cc5

Response parameters

NameTypeDescriptionExample value
object

Schema of Response

contentstring

The content of the memory fragment.

The user likes to eat tomato and egg stir-fry
memoryIdstring

The long-term memory ID.

6bff4f317a14442fbc9f73d29dbd5fc3
memoryNodeIdstring

The memory fragment ID.

68de06c95368463a8be4a84efc872cc5
requestIdstring

The request ID.

8C56C7AF-6573-19CE-B018-E05E1EDCF4C5
workspaceIdstring

The workspace ID.

llm-us9hjmt32nysdm5v

Examples

Success response example JSON format
{
  "content": "用户喜欢吃西红柿炒鸡蛋\n",
  "memoryId": "6bff4f317a14442fbc9f73d29dbd5fc3\n",
  "memoryNodeId": "68de06c95368463a8be4a84efc872cc5",
  "requestId": "8C56C7AF-6573-19CE-B018-E05E1EDCF4C5\n",
  "workspaceId": "llm-us9hjmt32nysdm5v\n"
}

Error codes

HTTP status codeError codeError messageDescription
400Memory.MemoryNodeContentInvalidMemory node content is invalid.The long-term memory node content is invalid.
404Memory.MemoryIdNotFoundMemory Id not exist or is not authorized.memoryId not found.
404Memory.MemoryNodeNotFoundMemoryNode not found.The long-term memory node is not found.
500Memory.InternalErrorMemory service inner exception.An internal error occurred in the long-term memory service.
Visit the Error Center to view more error codes.