Skip to content

Commit 6e3fd14

Browse files
Adding missing command to add documents to vector store (#53)
Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent e836adb commit 6e3fd14

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

docs/vector_store.ipynb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
"cell_type": "markdown",
273273
"metadata": {},
274274
"source": [
275-
"#### 🔐 Add Documents\n",
275+
"#### Add Documents\n",
276276
"To add documents in the vector store."
277277
]
278278
},
@@ -289,14 +289,15 @@
289289
"loader = HNLoader(\"https://news.ycombinator.com/item?id=34817881\")\n",
290290
"\n",
291291
"documents = loader.load()\n",
292-
"ids = [str(uuid.uuid4()) for _ in range(len(documents))]"
292+
"ids = [str(uuid.uuid4()) for _ in range(len(documents))]\n",
293+
"db.add_documents(documents, ids)"
293294
]
294295
},
295296
{
296297
"cell_type": "markdown",
297298
"metadata": {},
298299
"source": [
299-
"#### 🔐 Search Documents\n",
300+
"#### Search Documents\n",
300301
"To search documents in the vector store with similarity search."
301302
]
302303
},
@@ -313,7 +314,7 @@
313314
"cell_type": "markdown",
314315
"metadata": {},
315316
"source": [
316-
"#### 🔐 Search Documents\n",
317+
"#### Search Documents\n",
317318
"To search documents in the vector store with max marginal relevance search."
318319
]
319320
},
@@ -330,7 +331,7 @@
330331
"cell_type": "markdown",
331332
"metadata": {},
332333
"source": [
333-
"#### 🔐 Delete Documents\n",
334+
"#### Delete Documents\n",
334335
"To remove documents from the vector store, use the IDs that correspond to the values in the `row_id`` column when initializing the VectorStore."
335336
]
336337
},
@@ -347,7 +348,7 @@
347348
"cell_type": "markdown",
348349
"metadata": {},
349350
"source": [
350-
"#### 🔐 Delete Documents\n",
351+
"#### Delete Documents\n",
351352
"To remove documents from the vector store, you can utilize the documents themselves. The content column and metadata columns provided during VectorStore initialization will be used to find out the rows corresponding to the documents. Any matching rows will then be deleted."
352353
]
353354
},
@@ -377,7 +378,7 @@
377378
"name": "python",
378379
"nbconvert_exporter": "python",
379380
"pygments_lexer": "ipython3",
380-
"version": "3.11.6"
381+
"version": "3.11.8"
381382
}
382383
},
383384
"nbformat": 4,

0 commit comments

Comments
 (0)