diff --git a/docs/cookbooks/companions/travel-assistant.mdx b/docs/cookbooks/companions/travel-assistant.mdx index 017df120a..54148d91f 100644 --- a/docs/cookbooks/companions/travel-assistant.mdx +++ b/docs/cookbooks/companions/travel-assistant.mdx @@ -54,7 +54,6 @@ config = { "embedding_model_dims": 3072, } }, - "version": "v1.1", } class PersonalTravelAssistant: @@ -154,7 +153,7 @@ class PersonalTravelAssistant: return answer def get_memories(self, user_id): - memories = self.memory.get_all(user_id=user_id) + memories = self.memory.get_all(filters={"user_id": user_id}) return [m['memory'] for m in memories.get('results', [])] def search_memories(self, query, user_id): diff --git a/docs/cookbooks/integrations/aws-bedrock.mdx b/docs/cookbooks/integrations/aws-bedrock.mdx index b29eb90dd..c2d73b4dd 100644 --- a/docs/cookbooks/integrations/aws-bedrock.mdx +++ b/docs/cookbooks/integrations/aws-bedrock.mdx @@ -42,7 +42,7 @@ This sets up Mem0 with: ```python import boto3 from opensearchpy import RequestsHttpConnection, AWSV4SignerAuth -from mem0.memory.main import Memory +from mem0 import Memory region = 'us-west-2' service = 'aoss' diff --git a/docs/integrations/aws-bedrock.mdx b/docs/integrations/aws-bedrock.mdx index e93532399..64ba74e4f 100644 --- a/docs/integrations/aws-bedrock.mdx +++ b/docs/integrations/aws-bedrock.mdx @@ -49,7 +49,7 @@ Import necessary modules and configure Mem0: ```python import boto3 from opensearchpy import OpenSearch, RequestsHttpConnection, AWSV4SignerAuth -from mem0.memory.main import Memory +from mem0 import Memory region = 'us-west-2' service = 'aoss' diff --git a/docs/integrations/keywords.mdx b/docs/integrations/keywords.mdx index 28a0d05d2..0b19c825a 100644 --- a/docs/integrations/keywords.mdx +++ b/docs/integrations/keywords.mdx @@ -24,7 +24,7 @@ You can get your Mem0 API key from the - Pair `agent_id` filters with ticket-specific metadata so shared support bots return only the tickets they can act on in the current session. + Pair agent ID filters with ticket-specific metadata so shared support bots return only the tickets they can act on in the current session. ### Content recommendation filtering @@ -373,9 +379,9 @@ results = m.search( # Personalized content filtering results = m.search( "recommend content", - user_id="reader123", filters={ "AND": [ + {"user_id": "reader123"}, { "OR": [ {"genre": {"in": ["sci-fi", "fantasy"]}}, @@ -400,8 +406,8 @@ results = m.search( try: results = m.search( "test query", - user_id="alice", filters={ + "user_id": "alice", "invalid_operator": {"unknown": "value"} } ) @@ -409,8 +415,7 @@ except ValueError as e: print(f"Filter error: {e}") results = m.search( "test query", - user_id="alice", - filters={"category": "general"} + filters={"user_id": "alice", "category": "general"} ) ``` diff --git a/docs/open-source/features/reranker-search.mdx b/docs/open-source/features/reranker-search.mdx index c99a7e932..94c63810a 100644 --- a/docs/open-source/features/reranker-search.mdx +++ b/docs/open-source/features/reranker-search.mdx @@ -189,7 +189,7 @@ async_memory = AsyncMemory.from_config(config) async def search_with_rerank(): return await async_memory.search( "What are my preferences?", - user_id="alice", + filters={"user_id": "alice"}, rerank=True ) @@ -272,7 +272,7 @@ results = m.search("query", filters={"user_id": "alice"}) ```python results = m.search( "What are my food preferences?", - user_id="alice" + filters={"user_id": "alice"} ) for result in results["results"]: @@ -289,13 +289,13 @@ for result in results["results"]: ```python results_with_rerank = m.search( "What movies do I like?", - user_id="alice", + filters={"user_id": "alice"}, rerank=True ) results_without_rerank = m.search( "What movies do I like?", - user_id="alice", + filters={"user_id": "alice"}, rerank=False ) ``` @@ -313,9 +313,9 @@ results_without_rerank = m.search( ```python results = m.search( "important work tasks", - user_id="alice", filters={ "AND": [ + {"user_id": "alice"}, {"category": "work"}, {"priority": {"gte": 7}} ] @@ -348,8 +348,7 @@ m = Memory.from_config(config) results = m.search( "customer having login issues with mobile app", - agent_id="support_bot", - filters={"category": "technical_support"}, + filters={"agent_id": "support_bot", "category": "technical_support"}, rerank=True ) ``` @@ -363,8 +362,7 @@ results = m.search( ```python results = m.search( "science fiction books with space exploration themes", - user_id="reader123", - filters={"content_type": "book_recommendation"}, + filters={"user_id": "reader123", "content_type": "book_recommendation"}, rerank=True, top_k=10 ) @@ -383,9 +381,9 @@ for result in results["results"]: ```python results = m.search( "What restaurants did I enjoy last month that had good vegetarian options?", - user_id="foodie_user", filters={ "AND": [ + {"user_id": "foodie_user"}, {"category": "dining"}, {"rating": {"gte": 4}}, {"date": {"gte": "2024-01-01"}} diff --git a/docs/open-source/node-quickstart.mdx b/docs/open-source/node-quickstart.mdx index 4f97593df..e04502e68 100644 --- a/docs/open-source/node-quickstart.mdx +++ b/docs/open-source/node-quickstart.mdx @@ -76,7 +76,6 @@ By default the Node SDK uses local-friendly settings (OpenAI `gpt-5-mini`, `text import { Memory } from "mem0ai/oss"; const memory = new Memory({ - version: "v1.1", embedder: { provider: "openai", config: { @@ -221,7 +220,6 @@ Mem0 offers granular configuration across vector stores, LLMs, embedders, and hi | Parameter | Description | Default | | --- | --- | --- | | `historyDbPath` | Path to history database | `"{mem0_dir}/history.db"` | -| `version` | API version | `"v1.0"` | | `customInstructions` | Custom processing prompt | `undefined` | @@ -234,7 +232,6 @@ Mem0 offers granular configuration across vector stores, LLMs, embedders, and hi ```ts const config = { - version: "v1.1", embedder: { provider: "openai", config: {