|
99 | 99 | "vector_store = Chroma(\n",
|
100 | 100 | " collection_name=\"example_collection\",\n",
|
101 | 101 | " embedding_function=embeddings,\n",
|
102 |
| - " persist_directory=\"./chroma_langchain_db\", # Where to save data locally, remove if not neccesary\n", |
| 102 | + " persist_directory=\"./chroma_langchain_db\", # Where to save data locally, remove if not necessary\n", |
103 | 103 | ")"
|
104 | 104 | ]
|
105 | 105 | },
|
|
179 | 179 | "from langchain_core.documents import Document\n",
|
180 | 180 | "\n",
|
181 | 181 | "document_1 = Document(\n",
|
182 |
| - " page_content=\"I had chocalate chip pancakes and scrambled eggs for breakfast this morning.\",\n", |
| 182 | + " page_content=\"I had chocolate chip pancakes and scrambled eggs for breakfast this morning.\",\n", |
183 | 183 | " metadata={\"source\": \"tweet\"},\n",
|
184 | 184 | " id=1,\n",
|
185 | 185 | ")\n",
|
|
273 | 273 | "outputs": [],
|
274 | 274 | "source": [
|
275 | 275 | "updated_document_1 = Document(\n",
|
276 |
| - " page_content=\"I had chocalate chip pancakes and fried eggs for breakfast this morning.\",\n", |
| 276 | + " page_content=\"I had chocolate chip pancakes and fried eggs for breakfast this morning.\",\n", |
277 | 277 | " metadata={\"source\": \"tweet\"},\n",
|
278 | 278 | " id=1,\n",
|
279 | 279 | ")\n",
|
|
287 | 287 | "vector_store.update_document(document_id=uuids[0], document=updated_document_1)\n",
|
288 | 288 | "# You can also update multiple documents at once\n",
|
289 | 289 | "vector_store.update_documents(\n",
|
290 |
| - " ids=uuids[:2], documents=[updated_document_1, updated_document_1]\n", |
| 290 | + " ids=uuids[:2], documents=[updated_document_1, updated_document_2]\n", |
291 | 291 | ")"
|
292 | 292 | ]
|
293 | 293 | },
|
|
0 commit comments