File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
libs/partners/qdrant/tests/integration_tests/async_api Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -104,27 +104,25 @@ async def test_async_similarity_search_with_consistency(location: str) -> None:
104
104
await vec_store .aadd_texts (texts )
105
105
106
106
# Test with different consistency levels
107
-
107
+
108
108
# Test with factor consistency (int)
109
- results = await vec_store .asimilarity_search (
110
- "test" , k = 1 , consistency = 1
111
- )
109
+ results = await vec_store .asimilarity_search ("test" , k = 1 , consistency = 1 )
112
110
assert len (results ) <= 1
113
111
if results :
114
112
assert results [0 ].page_content == "test document"
115
-
113
+
116
114
# Test with majority consistency
117
115
results = await vec_store .asimilarity_search (
118
116
"test" , k = 1 , consistency = models .ReadConsistencyType .MAJORITY
119
117
)
120
118
assert len (results ) <= 1
121
119
if results :
122
120
assert results [0 ].page_content == "test document"
123
-
121
+
124
122
# Test with all consistency
125
123
results = await vec_store .asimilarity_search (
126
124
"test" , k = 1 , consistency = models .ReadConsistencyType .ALL
127
125
)
128
126
assert len (results ) <= 1
129
127
if results :
130
- assert results [0 ].page_content == "test document"
128
+ assert results [0 ].page_content == "test document"
You can’t perform that action at this time.
0 commit comments