SearchMemories
Searches memories based on query conditions and filters.
Operation description
This topic provides an example on how to configure the Settings for a threshold-based alert rule for the cpu_total metric of the i-uf6j91r34rnwawoo**** instance in the acs_ecs_dashboard namespace of Elastic Computing Service (ECS) server. The alert contact group for the alert rule is ECS_Group, the alert rule name is test123, the alert rule ID is a151cd6023eacee2f0978e03863cc1697c89508****, the statistical method for the Critical level is Average, the comparison operator for the Critical level is GreaterThanOrEqualToThreshold, the threshold for the Critical level is 90, and the number of alert retry attempts for the Critical level is 3.
On August 15, 2024, Statistics validation is increased. The statistical value can only be the Statistics corresponding to the metric. For more information about how to obtain the value of this parameter, see Alibaba Cloud service monitoring metrics.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:SearchMemories |
list |
*MemoryStore
|
None | None |
Request syntax
POST /workspace/{workspace}/memorystore/{memoryStoreName}/memory/search HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspace |
string |
Yes |
The workspace name. |
workspace-test |
| memoryStoreName |
string |
Yes |
The memory store name. |
qianyi_test_1 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| query |
string |
No |
The query content. |
What I like |
| userId |
string |
No |
The user ID. |
test_session_001 |
| topK |
integer |
No |
The top-K entries to return. |
1 |
| agentId |
string |
No |
The agent ID. |
972772996913709056 |
| appId |
string |
No |
The AppKey of the project assigned to the merchant. |
mm_480d961a1b5e4efe84603f4cbc0f |
| runId |
string |
No |
The run ID. |
test_session_001 |
| rerank |
boolean |
No |
Specifies whether to rerank. |
true |
| filters |
object |
No |
The filter conditions. |
|
|
any |
No |
The filter conditions. |
{"__strategy_type__":"Fact"} |
|
| threshold |
number |
No |
The similarity threshold. |
0.3 |
| retrievalOption |
string |
No |
The retrieval options. |
reranker,llm_rank |
| searchType |
string |
No |
The query type. |
experience |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| results |
array<object> |
The returned results. |
|
|
array<object> |
The returned results. |
||
| actorId |
string |
The actor ID. |
test_session_001 |
| agentId |
string |
The agent ID of the application. |
972772996913709056 |
| createdAt |
string |
The creation time. |
1762773128968 |
| hash |
string |
The memory hash value. |
d791bf27236c5532056a13279baad3517042bb8d5b1bdb02e7871fa632debffe |
| id |
string |
The memory ID. |
019ca1e5-7307-7d50-b943-5e628326a8ed |
| memory |
string |
The memory. |
My name is Zhang San and I live in Hangzhou. |
| metadata |
object |
The metadata. |
{"__strategy_type__":"Fact"} |
|
any |
The metadata. |
{"__strategy_type__":"Fact"} |
|
| role |
string |
The role that initiated the message. |
user |
| runId |
string |
The run ID. |
test_session_001 |
| score |
number |
The similarity score. |
13.21 |
| updatedAt |
string |
The update time. |
1764902557784 |
| userId |
string |
The user ID. |
test_session_001 |
| relations |
array<object> |
The relationships. |
|
|
object |
The relationships. |
||
| destination |
string |
The destination. |
test |
| relationship |
string |
The relationships. |
test |
| source |
string |
The source. |
todo_open_dingoj06pvqfeayy3lkr |
| requestId |
string |
The request ID. |
0CEC5375-C554-562B-A65F-9A629907C1F0 |
Examples
Success response
JSON format
{
"results": [
{
"actorId": "test_session_001",
"agentId": "972772996913709056",
"createdAt": "1762773128968",
"hash": "d791bf27236c5532056a13279baad3517042bb8d5b1bdb02e7871fa632debffe",
"id": "019ca1e5-7307-7d50-b943-5e628326a8ed",
"memory": "My name is Zhang San and I live in Hangzhou.",
"metadata": {
"key": "{\"__strategy_type__\":\"Fact\"}"
},
"role": "user",
"runId": "test_session_001",
"score": 13.21,
"updatedAt": "1764902557784",
"userId": "test_session_001"
}
],
"relations": [
{
"destination": "test",
"relationship": "test",
"source": "todo_open_dingoj06pvqfeayy3lkr"
}
],
"requestId": "0CEC5375-C554-562B-A65F-9A629907C1F0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.