Doc: Update search output (#2208)
This commit is contained in:
@@ -17,7 +17,6 @@ Mem0 offers two versions of the search API: v1 and v2. Here's how they differ:
|
|||||||
{
|
{
|
||||||
"id":"ea925981-272f-40dd-b576-be64e4871429",
|
"id":"ea925981-272f-40dd-b576-be64e4871429",
|
||||||
"memory":"Likes to play cricket and plays cricket on weekends.",
|
"memory":"Likes to play cricket and plays cricket on weekends.",
|
||||||
"hash":"c8809002-25c1-4c97-a3a2-227ce9c20c53",
|
|
||||||
"metadata":{
|
"metadata":{
|
||||||
"category":"hobbies"
|
"category":"hobbies"
|
||||||
},
|
},
|
||||||
@@ -61,7 +60,6 @@ Mem0 offers two versions of the search API: v1 and v2. Here's how they differ:
|
|||||||
{
|
{
|
||||||
"id": "ea925981-272f-40dd-b576-be64e4871429",
|
"id": "ea925981-272f-40dd-b576-be64e4871429",
|
||||||
"memory": "Likes to play cricket and plays cricket on weekends.",
|
"memory": "Likes to play cricket and plays cricket on weekends.",
|
||||||
"hash": "c8809002-25c1-4c97-a3a2-227ce9c20c53",
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"category": "hobbies"
|
"category": "hobbies"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1368,44 +1368,22 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The content of the memory"
|
"description": "The content of the memory"
|
||||||
},
|
},
|
||||||
"input": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"role": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"user",
|
|
||||||
"assistant"
|
|
||||||
],
|
|
||||||
"description": "The role of the speaker in the conversation"
|
|
||||||
},
|
|
||||||
"content": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "The content of the message"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"role",
|
|
||||||
"content"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "The conversation input that was used to generate this memory"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The identifier of the user associated with this memory"
|
"description": "The identifier of the user associated with this memory"
|
||||||
},
|
},
|
||||||
"hash": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "A hash of the memory content"
|
|
||||||
},
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"description": "Additional metadata associated with the memory"
|
"description": "Additional metadata associated with the memory"
|
||||||
},
|
},
|
||||||
|
"categories": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "Categories associated with the memory"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
@@ -1420,9 +1398,7 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
"memory",
|
"memory",
|
||||||
"input",
|
|
||||||
"user_id",
|
"user_id",
|
||||||
"hash",
|
|
||||||
"created_at",
|
"created_at",
|
||||||
"updated_at"
|
"updated_at"
|
||||||
]
|
]
|
||||||
@@ -1513,44 +1489,22 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The content of the memory"
|
"description": "The content of the memory"
|
||||||
},
|
},
|
||||||
"input": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"role": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"user",
|
|
||||||
"assistant"
|
|
||||||
],
|
|
||||||
"description": "The role of the speaker in the conversation"
|
|
||||||
},
|
|
||||||
"content": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "The content of the message"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"role",
|
|
||||||
"content"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "The conversation input that was used to generate this memory"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The identifier of the user associated with this memory"
|
"description": "The identifier of the user associated with this memory"
|
||||||
},
|
},
|
||||||
"hash": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "A hash of the memory content"
|
|
||||||
},
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"description": "Additional metadata associated with the memory"
|
"description": "Additional metadata associated with the memory"
|
||||||
},
|
},
|
||||||
|
"categories": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "Categories associated with the memory"
|
||||||
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
@@ -1565,9 +1519,7 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
"memory",
|
"memory",
|
||||||
"input",
|
|
||||||
"user_id",
|
"user_id",
|
||||||
"hash",
|
|
||||||
"created_at",
|
"created_at",
|
||||||
"updated_at"
|
"updated_at"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -400,18 +400,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Vegetarian. Allergic to nuts.",
|
"memory": "Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": {"food": "vegan"},
|
"metadata": {"food": "vegan"},
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
@@ -426,18 +415,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Vegetarian. Allergic to nuts.",
|
"memory": "Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": {"food": "vegan"},
|
"metadata": {"food": "vegan"},
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
@@ -480,18 +458,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": {"food": "vegan"},
|
"metadata": {"food": "vegan"},
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
@@ -580,18 +547,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": null,
|
"metadata": null,
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
@@ -655,18 +611,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": null,
|
"metadata": null,
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
@@ -739,18 +684,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
{
|
{
|
||||||
"id": "654fee-b411-4afe-b7e5-35789b72c4a5",
|
"id": "654fee-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700eiy8749aed75a",
|
|
||||||
"metadata": {"food": "vegan"},
|
"metadata": {"food": "vegan"},
|
||||||
"categories": ["food_preferences"],
|
"categories": ["food_preferences"],
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
|
|||||||
@@ -173,18 +173,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
|
|||||||
{
|
{
|
||||||
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
|
||||||
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
"memory": "Name: Alex. Vegetarian. Allergic to nuts.",
|
||||||
"input": [
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"user_id": "alex",
|
"user_id": "alex",
|
||||||
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
|
|
||||||
"metadata": null,
|
"metadata": null,
|
||||||
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
"created_at": "2024-07-20T01:30:36.275141-07:00",
|
||||||
"updated_at": "2024-07-20T01:30:36.275172-07:00"
|
"updated_at": "2024-07-20T01:30:36.275172-07:00"
|
||||||
|
|||||||
Reference in New Issue
Block a user