Search Memory

Query the memories of a specified user and return the memory fragments most relevant to the query content.

POST
/
search
/
memory
{
  "code": 0,
  "data": {
    "memory_detail_list": [
      {
        "id": "<string>",
        "memory_key": "<string>",
        "memory_value": "<string>",
        "memory_type": "LongTermMemory",
        "memory_time": "<string>",
        "conversation_id": "<string>",
        "status": "activated",
        "confidence": 0.95,
        "tags": [
          "<string>"
        ],
        "update_time": "<string>",
        "relativity": 0.87
      }
    ]
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Token API_key, available in API Console > API Keys

Body

application/json
user_id
string
required

Unique identifier of the user associated with the memory being queried.

conversation_id
string

Unique identifier of the conversation containing the memory. Providing this ensures the current conversation’s memories have higher priority over other historical.

query
string
required

Text content to search within the memories.

memory_limit_number
number
default: 6

Limits the number of memory items returned, controlling the length of memory fragments. Defaults to 6 if not provided.

Response

application/json

Successful Response

code
number
required

API status code. See Error Code for details.

Example: 0
data
SearchMemoryResponseData·object
Show child attributes
message
string
required

API response message.