_collection() — langchain Function Reference
Architecture documentation for the _collection() function in vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 13e731c1_dd84_1521_13d7_e6e72dedc9f8["_collection()"] d25f9e94_3ec0_b9ca_7d2f_eb7ef487ccab["Chroma"] 13e731c1_dd84_1521_13d7_e6e72dedc9f8 -->|defined in| d25f9e94_3ec0_b9ca_7d2f_eb7ef487ccab style 13e731c1_dd84_1521_13d7_e6e72dedc9f8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/chroma/langchain_chroma/vectorstores.py lines 432–442
def _collection(self) -> chromadb.Collection:
"""Returns the underlying Chroma collection or throws an exception."""
if self._chroma_collection is None:
msg = (
"Chroma collection not initialized. "
"Use `reset_collection` to re-create and initialize the collection. "
)
raise ValueError(
msg,
)
return self._chroma_collection
Domain
Subdomains
Source
Frequently Asked Questions
What does _collection() do?
_collection() is a function in the langchain codebase, defined in libs/partners/chroma/langchain_chroma/vectorstores.py.
Where is _collection() defined?
_collection() is defined in libs/partners/chroma/langchain_chroma/vectorstores.py at line 432.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free