Files
langchain-python/langchain
imaprogrammer a2830e3056 Update chroma.py: Persist directory from client_settings if provided there (#7087)
Change details:
- Description: When calling db.persist(), a check prevents from it
proceeding as the constructor only sets member `_persist_directory` from
parameters. But the ChromaDB client settings also has this parameter,
and if the client_settings parameter is used without passing the
persist_directory (which is optional), the `persist` method raises
`ValueError` for not setting `_persist_directory`. This change fixes it
by setting the member `_persist_directory` variable from client_settings
if it is set, else uses the constructor parameter.
- Issue: I didn't find any github issue of this, but I discovered it
after calling the persist method
  - Dependencies: None
- Tag maintainer: vectorstore related change - @rlancemartin, @eyurtsev
  - Twitter handle: Don't have one :(

*Additional discussion*: We may need to discuss the way I implemented
the fallback using `or`.

---------

Co-authored-by: rlm <pexpresss31@gmail.com>
2023-07-07 09:20:27 -07:00
..
2023-07-07 11:52:21 -04:00
2023-07-05 13:00:16 -04:00
2023-07-07 02:42:28 -04:00
2023-07-07 02:42:28 -04:00
2023-07-07 02:42:28 -04:00
2023-07-02 22:38:59 -04:00
2023-06-08 21:15:14 -07:00
2023-06-03 16:48:48 -07:00
2022-11-12 11:22:32 -08:00
2023-02-20 21:15:45 -08:00
2023-07-07 02:42:28 -04:00