mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-06 07:04:01 +00:00
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:
parent
cc50a4579e
commit
3fb4997ad8
@ -170,12 +170,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"attachments": {},
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "f568a322",
|
"id": "f568a322",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"### Persist the Database\n",
|
"### 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."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user