Skip to content

Commit

Permalink
Persist database regardless of notebook or script context (langchain-…
Browse files Browse the repository at this point in the history
…ai#2351)

`persist()` is required even if it's invoked in a script.

Without this, an error is thrown:

```
chromadb.errors.NoIndexException: Index is not initialized
```
  • Loading branch information
bkamapantula committed Apr 3, 2023
1 parent cc50a45 commit 3fb4997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/modules/indexes/vectorstores/examples/chroma.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f568a322",
"metadata": {},
"source": [
"### Persist the Database\n",
"In a notebook, we should call persist() to ensure the embeddings are written to disk. This isn't necessary in a script - the database will be automatically persisted when the client object is destroyed."
"We should call persist() to ensure the embeddings are written to disk."
]
},
{
Expand Down

0 comments on commit 3fb4997

Please sign in to comment.