Doc: Update search output (#2208)

This commit is contained in:
Dev Khant
2025-02-14 06:34:47 +05:30
committed by GitHub
parent cd31c5897a
commit 064d28626b
4 changed files with 14 additions and 141 deletions

View File

@@ -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",
"memory":"Likes to play cricket and plays cricket on weekends.",
"hash":"c8809002-25c1-4c97-a3a2-227ce9c20c53",
"metadata":{
"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",
"memory": "Likes to play cricket and plays cricket on weekends.",
"hash": "c8809002-25c1-4c97-a3a2-227ce9c20c53",
"metadata": {
"category": "hobbies"
},

View File

@@ -1368,44 +1368,22 @@
"type": "string",
"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": {
"type": "string",
"description": "The identifier of the user associated with this memory"
},
"hash": {
"type": "string",
"description": "A hash of the memory content"
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Additional metadata associated with the memory"
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Categories associated with the memory"
},
"created_at": {
"type": "string",
"format": "date-time",
@@ -1420,9 +1398,7 @@
"required": [
"id",
"memory",
"input",
"user_id",
"hash",
"created_at",
"updated_at"
]
@@ -1513,44 +1489,22 @@
"type": "string",
"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": {
"type": "string",
"description": "The identifier of the user associated with this memory"
},
"hash": {
"type": "string",
"description": "A hash of the memory content"
},
"metadata": {
"type": "object",
"nullable": true,
"description": "Additional metadata associated with the memory"
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Categories associated with the memory"
},
"created_at": {
"type": "string",
"format": "date-time",
@@ -1565,9 +1519,7 @@
"required": [
"id",
"memory",
"input",
"user_id",
"hash",
"created_at",
"updated_at"
]

View File

@@ -400,18 +400,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/" \
{
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": {"food": "vegan"},
"categories": ["food_preferences"],
"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",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": {"food": "vegan"},
"categories": ["food_preferences"],
"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",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": {"food": "vegan"},
"categories": ["food_preferences"],
"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",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": null,
"categories": ["food_preferences"],
"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",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": null,
"categories": ["food_preferences"],
"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",
"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",
"hash": "9ee7e1455e84d1dab700eiy8749aed75a",
"metadata": {"food": "vegan"},
"categories": ["food_preferences"],
"created_at": "2024-07-20T01:30:36.275141-07:00",

View File

@@ -173,18 +173,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \
{
"id": "7f165f7e-b411-4afe-b7e5-35789b72c4a5",
"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",
"hash": "9ee7e1455e84d1dab700ed8749aed75a",
"metadata": null,
"created_at": "2024-07-20T01:30:36.275141-07:00",
"updated_at": "2024-07-20T01:30:36.275172-07:00"