mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 18:08:36 +00:00
Fix ChromaDB integration -> docker container instructions (#8447)
## Description This PR handles modifying the Chroma DB integration's documentation. It modifies the **Docker container** example to fix the instructions mentioned in the documentation. In the current documentation, the below `client.reset()` line causes a runtime error: ```py ... client = chromadb.HttpClient(settings=Settings(allow_reset=True)) client.reset() # resets the database collection = client.create_collection("my_collection") ... ``` `Exception: {"error":"ValueError('Resetting is not allowed by this configuration')"}` This is due to the Chroma DB server needing to have the `allow_reset` flag set to `true` there as well. This is fixed by adding the `ALLOW_RESET=TRUE` to the `docker-compose` file environment variable to the docker container before spinning it ## Issue This fixes the runtime error that occurs when running the docker container example code ## Tag Maintainer @rlancemartin, @eyurtsev
This commit is contained in:
parent
7f9c6c3baa
commit
9975ba4124
@ -215,10 +215,23 @@
|
|||||||
"Chroma has the ability to handle multiple `Collections` of documents, but the LangChain interface expects one, so we need to specify the collection name. The default collection name used by LangChain is \"langchain\".\n",
|
"Chroma has the ability to handle multiple `Collections` of documents, but the LangChain interface expects one, so we need to specify the collection name. The default collection name used by LangChain is \"langchain\".\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Here is how to clone, build, and run the Docker Image:\n",
|
"Here is how to clone, build, and run the Docker Image:\n",
|
||||||
"```\n",
|
"```sh\n",
|
||||||
"git clone git@github.com:chroma-core/chroma.git\n",
|
"git clone git@github.com:chroma-core/chroma.git\n",
|
||||||
"docker-compose up -d --build\n",
|
"```\n",
|
||||||
"```"
|
"\n",
|
||||||
|
"Edit the `docker-compose.yml` file and add `ALLOW_RESET=TRUE` under `environment`\n",
|
||||||
|
"```yaml\n",
|
||||||
|
" ...\n",
|
||||||
|
" command: uvicorn chromadb.app:app --reload --workers 1 --host 0.0.0.0 --port 8000 --log-config log_config.yml\n",
|
||||||
|
" environment:\n",
|
||||||
|
" - IS_PERSISTENT=TRUE\n",
|
||||||
|
" - ALLOW_RESET=TRUE\n",
|
||||||
|
" ports:\n",
|
||||||
|
" - 8000:8000\n",
|
||||||
|
" ...\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"Then run `docker-compose up -d --build`"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user