diff --git a/tests/unit/test_storage/test_doc_embeddings_milvus_storage.py b/tests/unit/test_storage/test_doc_embeddings_milvus_storage.py index ef66b741..6530c020 100644 --- a/tests/unit/test_storage/test_doc_embeddings_milvus_storage.py +++ b/tests/unit/test_storage/test_doc_embeddings_milvus_storage.py @@ -23,11 +23,11 @@ class TestMilvusDocEmbeddingsStorageProcessor: # Create test document embeddings chunk1 = ChunkEmbeddings( chunk_id="This is the first document chunk", - vectors=[[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]] + vector=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6] ) chunk2 = ChunkEmbeddings( chunk_id="This is the second document chunk", - vectors=[[0.7, 0.8, 0.9]] + vector=[0.7, 0.8, 0.9] ) message.chunks = [chunk1, chunk2] @@ -85,7 +85,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="Test document content", - vectors=[[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]] + vector=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6] ) message.chunks = [chunk] @@ -137,7 +137,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -156,7 +156,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id=None, - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -177,15 +177,15 @@ class TestMilvusDocEmbeddingsStorageProcessor: valid_chunk = ChunkEmbeddings( chunk_id="Valid document content", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) empty_chunk = ChunkEmbeddings( chunk_id="", - vectors=[[0.4, 0.5, 0.6]] + vector=[0.4, 0.5, 0.6] ) another_valid = ChunkEmbeddings( chunk_id="Another valid chunk", - vectors=[[0.7, 0.8, 0.9]] + vector=[0.7, 0.8, 0.9] ) message.chunks = [valid_chunk, empty_chunk, another_valid] @@ -229,7 +229,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="Document with no vectors", - vectors=[] + vector=[] ) message.chunks = [chunk] @@ -283,7 +283,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="chunk/doc/unicode-éñ中文🚀", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -306,7 +306,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: long_chunk_id = "chunk/doc/" + "a" * 200 chunk = ChunkEmbeddings( chunk_id=long_chunk_id, - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -327,7 +327,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id=" \n\t ", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -358,7 +358,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="Test content", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] @@ -379,7 +379,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: message1.metadata.collection = 'collection1' chunk1 = ChunkEmbeddings( chunk_id="User1 content", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message1.chunks = [chunk1] @@ -390,7 +390,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: message2.metadata.collection = 'collection2' chunk2 = ChunkEmbeddings( chunk_id="User2 content", - vectors=[[0.4, 0.5, 0.6]] + vector=[0.4, 0.5, 0.6] ) message2.chunks = [chunk2] @@ -421,7 +421,7 @@ class TestMilvusDocEmbeddingsStorageProcessor: chunk = ChunkEmbeddings( chunk_id="Special chars test", - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.chunks = [chunk] diff --git a/tests/unit/test_storage/test_graph_embeddings_milvus_storage.py b/tests/unit/test_storage/test_graph_embeddings_milvus_storage.py index ebb93b62..48b9c4f6 100644 --- a/tests/unit/test_storage/test_graph_embeddings_milvus_storage.py +++ b/tests/unit/test_storage/test_graph_embeddings_milvus_storage.py @@ -23,11 +23,11 @@ class TestMilvusGraphEmbeddingsStorageProcessor: # Create test entities with embeddings entity1 = EntityEmbeddings( entity=Term(type=IRI, iri='http://example.com/entity1'), - vectors=[[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]] + vector=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6] ) entity2 = EntityEmbeddings( entity=Term(type=LITERAL, value='literal entity'), - vectors=[[0.7, 0.8, 0.9]] + vector=[0.7, 0.8, 0.9] ) message.entities = [entity1, entity2] @@ -85,7 +85,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: entity = EntityEmbeddings( entity=Term(type=IRI, iri='http://example.com/entity'), - vectors=[[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]] + vector=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6] ) message.entities = [entity] @@ -137,7 +137,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: entity = EntityEmbeddings( entity=Term(type=LITERAL, value=''), - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.entities = [entity] @@ -156,7 +156,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: entity = EntityEmbeddings( entity=Term(type=LITERAL, value=None), - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) message.entities = [entity] @@ -175,7 +175,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: valid_entity = EntityEmbeddings( entity=Term(type=IRI, iri='http://example.com/valid'), - vectors=[[0.1, 0.2, 0.3]], + vector=[0.1, 0.2, 0.3], chunk_id='' ) empty_entity = EntityEmbeddings( @@ -185,7 +185,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: ) none_entity = EntityEmbeddings( entity=Term(type=LITERAL, value=None), - vectors=[[0.7, 0.8, 0.9]], + vector=[0.7, 0.8, 0.9], chunk_id='' ) message.entities = [valid_entity, empty_entity, none_entity] @@ -222,7 +222,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: entity = EntityEmbeddings( entity=Term(type=IRI, iri='http://example.com/entity'), - vectors=[] + vector=[] ) message.entities = [entity] @@ -274,7 +274,7 @@ class TestMilvusGraphEmbeddingsStorageProcessor: uri_entity = EntityEmbeddings( entity=Term(type=IRI, iri='http://example.com/uri_entity'), - vectors=[[0.1, 0.2, 0.3]] + vector=[0.1, 0.2, 0.3] ) literal_entity = EntityEmbeddings( entity=Term(type=LITERAL, value='literal entity text'),