Persist database regardless of notebook or script context (#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
```
This commit is contained in:
Bhanu K 2023-04-04 02:51:17 +05:30 committed by GitHub
parent cc50a4579e
commit 3fb4997ad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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."
]
},
{