Closed ggozad closed 2 weeks ago
Similar error on my end when trying to connect to my pgvector store (via supabase), the error I get is:
ValidationError: 1 validation error for MemoryConfig vector_store Value error, Extra fields not allowed: path. Please input only the following fields: embedding_model_dims, host, dbname, port, user, collection_name, password [type=value_error, input_value={'user': '...'path': '/tmp/pgvector'}, input_type=dict]
is it something to do with this file? https://github.com/mem0ai/mem0/blob/4f5a40a84f0f43e78740710ab0e858e20edd6925/mem0/vector_stores/configs.py#L5
i made these changes locally and it started working. Changed:
if "path" not in config: config["path"] = f"/tmp/{provider}"
with:
if provider != 'pgvector' and "path" not in config:
config["path"] = f"/tmp/{provider}"
then installing psycopg2-binary and full restarting everything and passing below to the config:
"vector_store": { "provider": "pgvector", "config": { "user": SUPABASE_DB_USER, "password": SUPABASE_DB_PASSWORD, "host": SUPABASE_DB_HOST, "port": SUPABASE_DB_PORT, } },
Closing this as #1703 fixes the issue. Feel free to open it if there's still problem with it.
🐛 Describe the bug
Pedantic validation fails when trying to instantiate a memory using PGVector. The following is probably the easiest way to reproduce cleanly:
which leads to: