MongoDB Vector Store misaligned strings and classes (#3064)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import time
|
||||
import pytest
|
||||
from unittest.mock import MagicMock, patch
|
||||
from mem0.vector_stores.mongodb import MongoVector
|
||||
from mem0.vector_stores.mongodb import MongoDB
|
||||
from pymongo.operations import SearchIndexModel
|
||||
|
||||
@pytest.fixture
|
||||
@@ -16,12 +15,11 @@ def mongo_vector_fixture(mock_mongo_client):
|
||||
mock_collection.find.return_value = []
|
||||
mock_db.list_collection_names.return_value = []
|
||||
|
||||
mongo_vector = MongoVector(
|
||||
mongo_vector = MongoDB(
|
||||
db_name="test_db",
|
||||
collection_name="test_collection",
|
||||
embedding_model_dims=1536,
|
||||
user="username",
|
||||
password="password",
|
||||
mongo_uri="mongodb://username:password@localhost:27017"
|
||||
)
|
||||
return mongo_vector, mock_collection, mock_db
|
||||
|
||||
@@ -48,7 +46,7 @@ def test_initalize_create_col(mongo_vector_fixture):
|
||||
"fields": {
|
||||
"embedding": {
|
||||
"type": "knnVector",
|
||||
"d": 1536,
|
||||
"dimensions": 1536,
|
||||
"similarity": "cosine",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user