File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libs/core/tests/unit_tests/vectorstores Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -157,15 +157,15 @@ async def test_inmemory_upsert() -> None:
157
157
store = InMemoryVectorStore (embedding = embedding )
158
158
159
159
# Check sync version
160
- store .upsert ([Document (page_content = "foo" , id = "1" )])
160
+ store .add_documents ([Document (page_content = "foo" , id = "1" )])
161
161
assert sorted (store .store .keys ()) == ["1" ]
162
162
163
163
# Check async version
164
- await store .aupsert ([Document (page_content = "bar" , id = "2" )])
164
+ await store .aadd_documents ([Document (page_content = "bar" , id = "2" )])
165
165
assert sorted (store .store .keys ()) == ["1" , "2" ]
166
166
167
167
# update existing document
168
- await store .aupsert (
168
+ await store .aadd_documents (
169
169
[Document (page_content = "baz" , id = "2" , metadata = {"metadata" : "value" })]
170
170
)
171
171
item = store .store ["2" ]
@@ -183,7 +183,7 @@ async def test_inmemory_get_by_ids() -> None:
183
183
"""Test get by ids."""
184
184
store = InMemoryVectorStore (embedding = DeterministicFakeEmbedding (size = 3 ))
185
185
186
- store .upsert (
186
+ store .add_documents (
187
187
[
188
188
Document (page_content = "foo" , id = "1" , metadata = {"metadata" : "value" }),
189
189
Document (page_content = "bar" , id = "2" ),
You can’t perform that action at this time.
0 commit comments