From fbb8e712241c200278506feaeac2a74fe75f4f11 Mon Sep 17 00:00:00 2001 From: kartik-mem0 Date: Thu, 25 Jun 2026 11:59:37 +0530 Subject: [PATCH] docs(vectordbs): correct vector store config defaults and imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each fix verified against mem0/vector_stores/ source and configs: - baidu: table_name default mem0_table → mem0 (BaiduDBConfig) - langchain: TS import mem0ai → mem0ai/oss; fix undefined LangchainVectorStore variable to use MemoryVectorStore directly - mongodb: collection_name default mem0_collection → mem0; mongo_uri default corrected to mongodb://localhost:27017 (MongoDBConfig) - neon: hnsw default False → True (PGVectorConfig.hnsw = True) - neptune_analytics: extra name vector_stores → vector-stores (pyproject.toml) - pgvector: diskann default True → False; hnsw default False → True (PGVectorConfig) - upstash-vector: move enable_embeddings inside config: {} block (UpstashVectorConfig field, not top-level VectorStoreConfig) - valkey: remove non-existent distance_metric row (not in ValkeyConfig); fix extra name vector_stores → vector-stores - vertex_ai: region is required (no default in GoogleMatchingEngineConfig) - weaviate: install pip install weaviate weaviate-client → weaviate-client (weaviate is not a separate package) - overview: update TS supported vector DBs list to reflect actual mem0-ts/src/oss/src/vector_stores/ files --- docs/components/vectordbs/dbs/baidu.mdx | 2 +- docs/components/vectordbs/dbs/langchain.mdx | 6 +++--- docs/components/vectordbs/dbs/mongodb.mdx | 6 +++--- docs/components/vectordbs/dbs/neon.mdx | 2 +- docs/components/vectordbs/dbs/neptune_analytics.mdx | 2 +- docs/components/vectordbs/dbs/pgvector.mdx | 4 ++-- docs/components/vectordbs/dbs/upstash-vector.mdx | 4 +++- docs/components/vectordbs/dbs/valkey.mdx | 3 +-- docs/components/vectordbs/dbs/vertex_ai.mdx | 4 ++-- docs/components/vectordbs/dbs/weaviate.mdx | 2 +- docs/components/vectordbs/overview.mdx | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/components/vectordbs/dbs/baidu.mdx b/docs/components/vectordbs/dbs/baidu.mdx index 0a738fd6e..72a26a4ce 100644 --- a/docs/components/vectordbs/dbs/baidu.mdx +++ b/docs/components/vectordbs/dbs/baidu.mdx @@ -46,7 +46,7 @@ Here are the parameters available for configuring Baidu VectorDB: | `account` | Baidu VectorDB account name | `root` | | `api_key` | API key for accessing Baidu VectorDB | Required | | `database_name` | Name of the database | `mem0` | -| `table_name` | Name of the table | `mem0_table` | +| `table_name` | Name of the table | `mem0` | | `embedding_model_dims` | Dimensions of the embedding model | `1536` | | `metric_type` | Distance metric for similarity search | `L2` | diff --git a/docs/components/vectordbs/dbs/langchain.mdx b/docs/components/vectordbs/dbs/langchain.mdx index edaedab6c..ce4cd0537 100644 --- a/docs/components/vectordbs/dbs/langchain.mdx +++ b/docs/components/vectordbs/dbs/langchain.mdx @@ -47,12 +47,12 @@ m.add(messages, user_id="alice", metadata={"category": "movies"}) ``` ```typescript TypeScript -import { Memory } from "mem0ai"; +import { Memory } from "mem0ai/oss"; import { OpenAIEmbeddings } from "@langchain/openai"; -import { MemoryVectorStore as LangchainMemoryStore } from "langchain/vectorstores/memory"; +import { MemoryVectorStore } from "langchain/vectorstores/memory"; const embeddings = new OpenAIEmbeddings(); -const vectorStore = new LangchainVectorStore(embeddings); +const vectorStore = new MemoryVectorStore(embeddings); const config = { "vector_store": { diff --git a/docs/components/vectordbs/dbs/mongodb.mdx b/docs/components/vectordbs/dbs/mongodb.mdx index f110609c1..57f3fd432 100644 --- a/docs/components/vectordbs/dbs/mongodb.mdx +++ b/docs/components/vectordbs/dbs/mongodb.mdx @@ -42,8 +42,8 @@ Here are the parameters available for configuring MongoDB: | Parameter | Description | Default Value | | --- | --- | --- | | db_name | Name of the MongoDB database | `"mem0_db"` | -| collection_name | Name of the MongoDB collection | `"mem0_collection"` | +| collection_name | Name of the MongoDB collection | `"mem0"` | | embedding_model_dims | Dimensions of the embedding vectors | `1536` | -| mongo_uri | The MongoDB URI connection string | `mongodb://username:password@localhost:27017` | +| mongo_uri | The MongoDB URI connection string | `mongodb://localhost:27017` | -> **Note**: If `mongo_uri` is not provided, it will default to `mongodb://username:password@localhost:27017`. +> **Note**: If `mongo_uri` is not provided, it will default to `mongodb://localhost:27017`. diff --git a/docs/components/vectordbs/dbs/neon.mdx b/docs/components/vectordbs/dbs/neon.mdx index 20c91a569..65caa15e0 100644 --- a/docs/components/vectordbs/dbs/neon.mdx +++ b/docs/components/vectordbs/dbs/neon.mdx @@ -112,7 +112,7 @@ DATABASE_URL=postgresql://user:password@ep-example.us-east-2.aws.neon.tech/neond | `connection_string` | Neon Postgres connection string. | Required | | `collection_name` | Name for the vector collection. | `mem0` | | `embedding_model_dims` | Embedding model dimensions. | `1536` | -| `hnsw` | Enables HNSW indexing. | `False` | +| `hnsw` | Enables HNSW indexing. | `True` | | `sslmode` | PostgreSQL SSL mode. Use `require` for Neon. | Driver default | diff --git a/docs/components/vectordbs/dbs/neptune_analytics.mdx b/docs/components/vectordbs/dbs/neptune_analytics.mdx index ae3cb814a..12d601b99 100644 --- a/docs/components/vectordbs/dbs/neptune_analytics.mdx +++ b/docs/components/vectordbs/dbs/neptune_analytics.mdx @@ -10,7 +10,7 @@ description: "Use AWS Neptune Analytics as a vector store in Mem0, combining gra ## Installation ```bash -pip install mem0ai[vector_stores] +pip install mem0ai[vector-stores] ``` ## Usage diff --git a/docs/components/vectordbs/dbs/pgvector.mdx b/docs/components/vectordbs/dbs/pgvector.mdx index 9f59d7ebb..c2ed55049 100644 --- a/docs/components/vectordbs/dbs/pgvector.mdx +++ b/docs/components/vectordbs/dbs/pgvector.mdx @@ -79,8 +79,8 @@ Here are the parameters available for configuring pgvector: | `password` | Password to connect to the database | `None` | | `host` | The host where the Postgres server is running | `None` | | `port` | The port where the Postgres server is running | `None` | -| `diskann` | Whether to use diskann for vector similarity search (requires pgvectorscale) | `True` | -| `hnsw` | Whether to use hnsw for vector similarity search | `False` | +| `diskann` | Whether to use diskann for vector similarity search (requires pgvectorscale) | `False` | +| `hnsw` | Whether to use hnsw for vector similarity search | `True` | | `sslmode` | SSL mode for PostgreSQL connection (e.g., 'require', 'prefer', 'disable') | `None` | | `connection_string` | PostgreSQL connection string (overrides individual connection parameters) | `None` | | `connection_pool` | psycopg2 connection pool object (overrides connection string and individual parameters) | `None` | diff --git a/docs/components/vectordbs/dbs/upstash-vector.mdx b/docs/components/vectordbs/dbs/upstash-vector.mdx index 979242fef..6b20544b8 100644 --- a/docs/components/vectordbs/dbs/upstash-vector.mdx +++ b/docs/components/vectordbs/dbs/upstash-vector.mdx @@ -18,7 +18,9 @@ os.environ["UPSTASH_VECTOR_REST_TOKEN"] = "..." config = { "vector_store": { "provider": "upstash_vector", - "enable_embeddings": True, + "config": { + "enable_embeddings": True, + } } } diff --git a/docs/components/vectordbs/dbs/valkey.mdx b/docs/components/vectordbs/dbs/valkey.mdx index af1e28219..18bb03b5b 100644 --- a/docs/components/vectordbs/dbs/valkey.mdx +++ b/docs/components/vectordbs/dbs/valkey.mdx @@ -9,7 +9,7 @@ description: "Use Valkey as an open-source vector store in Mem0 for high-perform ## Installation ```bash -pip install mem0ai[vector_stores] +pip install mem0ai[vector-stores] ``` ## Usage @@ -51,7 +51,6 @@ Here are the parameters available for configuring Valkey: | `hnsw_ef_construction` | Size of dynamic candidate list for HNSW | `200` | | `hnsw_ef_runtime` | Size of dynamic candidate list for search | `10` | | `cluster_mode` | Enable cluster mode for Valkey cluster (CME) deployments | `false` | -| `distance_metric` | Distance metric for vector similarity | `cosine` | ## Cluster Mode diff --git a/docs/components/vectordbs/dbs/vertex_ai.mdx b/docs/components/vectordbs/dbs/vertex_ai.mdx index e3a326eeb..a124fbd15 100644 --- a/docs/components/vectordbs/dbs/vertex_ai.mdx +++ b/docs/components/vectordbs/dbs/vertex_ai.mdx @@ -24,7 +24,7 @@ config = { "deployment_index_id": "YOUR_DEPLOYMENT_INDEX_ID", # Required: Deployment-specific ID "project_id": "YOUR_PROJECT_ID", # Required: Google Cloud project ID "project_number": "YOUR_PROJECT_NUMBER", # Required: Google Cloud project number - "region": "YOUR_REGION", # Optional: Defaults to GOOGLE_CLOUD_REGION + "region": "YOUR_REGION", # Required: Google Cloud region "credentials_path": "path/to/credentials.json", # Optional: Defaults to GOOGLE_APPLICATION_CREDENTIALS "vector_search_api_endpoint": "YOUR_API_ENDPOINT" # Required for get operations } @@ -45,5 +45,5 @@ m.add("Your text here", user_id="user", metadata={"category": "example"}) | `project_id` | Google Cloud project ID | Yes | | `project_number` | Google Cloud project number | Yes | | `vector_search_api_endpoint` | Vector search API endpoint | Yes (for get operations) | -| `region` | Google Cloud region | No (defaults to GOOGLE_CLOUD_REGION) | +| `region` | Google Cloud region | Yes | | `credentials_path` | Path to service account credentials | No (defaults to GOOGLE_APPLICATION_CREDENTIALS) | diff --git a/docs/components/vectordbs/dbs/weaviate.mdx b/docs/components/vectordbs/dbs/weaviate.mdx index b08629d92..f7abde851 100644 --- a/docs/components/vectordbs/dbs/weaviate.mdx +++ b/docs/components/vectordbs/dbs/weaviate.mdx @@ -7,7 +7,7 @@ description: "Use Weaviate as an open-source vector search engine in Mem0 for st ### Installation ```bash -pip install weaviate weaviate-client +pip install weaviate-client ``` ### Usage diff --git a/docs/components/vectordbs/overview.mdx b/docs/components/vectordbs/overview.mdx index dbc06e7ed..7ad663e53 100644 --- a/docs/components/vectordbs/overview.mdx +++ b/docs/components/vectordbs/overview.mdx @@ -10,7 +10,7 @@ Mem0 includes built-in support for various popular databases. Memory can utilize See the list of supported vector databases below. - The following vector databases are supported in the Python implementation. The TypeScript implementation currently only supports Qdrant, Redis, Valkey, Vectorize and in-memory vector database. + The following vector databases are supported in the Python implementation. The TypeScript implementation currently supports Qdrant, Redis, PGVector, Supabase, LangChain, Azure AI Search, and Vectorize.