Doc: Update V2 Search/GetAll docs (#2158)
This commit is contained in:
@@ -1136,9 +1136,32 @@
|
|||||||
"name": "filters",
|
"name": "filters",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"user_id": {"type": "string"},
|
||||||
|
"agent_id": {"type": "string"},
|
||||||
|
"app_id": {"type": "string"},
|
||||||
|
"run_id": {"type": "string"},
|
||||||
|
"created_at": {"type": "string", "format": "date-time"},
|
||||||
|
"updated_at": {"type": "string", "format": "date-time"},
|
||||||
|
"categories": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"keywords": {"type": "string"}
|
||||||
|
},
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"in": {"type": "array"},
|
||||||
|
"gte": {"type": "string"},
|
||||||
|
"lte": {"type": "string"},
|
||||||
|
"gt": {"type": "string"},
|
||||||
|
"lt": {"type": "string"},
|
||||||
|
"ne": {"type": "string"},
|
||||||
|
"contains": {"type": "string"},
|
||||||
|
"icontains": {"type": "string"}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"description": "Filters to apply to the memories",
|
"description": "Filters to apply to the memories. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at, categories, keywords. Supports logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains)",
|
||||||
"style": "deepObject",
|
"style": "deepObject",
|
||||||
"explode": true
|
"explode": true
|
||||||
},
|
},
|
||||||
@@ -4523,9 +4546,30 @@
|
|||||||
"filters": {
|
"filters": {
|
||||||
"title": "Filters",
|
"title": "Filters",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "A dictionary of filters to apply to the search. Users can pass AND, OR, IN, gte, lte, gt, lt, ne, icontains operators for advanced filtering.",
|
"description": "A dictionary of filters to apply to the search. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at, categories, keywords. Supports logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains).",
|
||||||
|
"properties": {
|
||||||
|
"user_id": {"type": "string"},
|
||||||
|
"agent_id": {"type": "string"},
|
||||||
|
"app_id": {"type": "string"},
|
||||||
|
"run_id": {"type": "string"},
|
||||||
|
"created_at": {"type": "string", "format": "date-time"},
|
||||||
|
"updated_at": {"type": "string", "format": "date-time"},
|
||||||
|
"text": {"type": "string"},
|
||||||
|
"categories": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"metadata": {"type": "object"}
|
||||||
|
},
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"in": {"type": "array"},
|
||||||
|
"gte": {"type": "string"},
|
||||||
|
"lte": {"type": "string"},
|
||||||
|
"gt": {"type": "string"},
|
||||||
|
"lt": {"type": "string"},
|
||||||
|
"ne": {"type": "string"},
|
||||||
|
"contains": {"type": "string"},
|
||||||
|
"icontains": {"type": "string"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"top_k": {
|
"top_k": {
|
||||||
@@ -4548,6 +4592,18 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"description": "Whether to rerank the memories."
|
"description": "Whether to rerank the memories."
|
||||||
},
|
},
|
||||||
|
"threshold": {
|
||||||
|
"title": "Threshold",
|
||||||
|
"type": "number",
|
||||||
|
"default": 0.3,
|
||||||
|
"description": "The minimum similarity threshold for returned results."
|
||||||
|
},
|
||||||
|
"smart_search": {
|
||||||
|
"title": "Smart Search",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Whether to enable smart search functionality."
|
||||||
|
},
|
||||||
"org_name": {
|
"org_name": {
|
||||||
"title": "Organization Name",
|
"title": "Organization Name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
|
|
||||||
#### Search using custom filters
|
#### Search using custom filters
|
||||||
|
|
||||||
Our advanced search allows you to set custom search filters. You can filter by user_id, agent_id, app_id, date, and more.
|
Our advanced search allows you to set custom search filters. You can filter by user_id, agent_id, app_id, run_id, created_at, updated_at, categories, and text. The filters support logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains). For more details, see [V2 Search Memories](/api-reference/memory/v2-search-memories).
|
||||||
|
|
||||||
Here you need to define `version` as `v2` in the search method.
|
Here you need to define `version` as `v2` in the search method.
|
||||||
|
|
||||||
@@ -1209,7 +1209,7 @@ curl -X GET "https://api.mem0.ai/v1/memories/?user_id=alex123&keywords=to play&p
|
|||||||
|
|
||||||
#### Get all memories using custom filters
|
#### Get all memories using custom filters
|
||||||
|
|
||||||
Our advanced retrieval allows you to set custom filters when fetching memories. You can filter by user_id, agent_id, app_id, date, and more.
|
Our advanced retrieval allows you to set custom filters when fetching memories. You can filter by user_id, agent_id, app_id, run_id, created_at, updated_at, categories, and keywords. The filters support logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains). For more details, see [V2 Get Memories](/api-reference/memory/v2-get-memories).
|
||||||
|
|
||||||
Here you need to define `version` as `v2` in the get_all method.
|
Here you need to define `version` as `v2` in the get_all method.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user