__init__() — langchain Function Reference
Architecture documentation for the __init__() function in in_memory.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6927944c_3d1a_9e9a_e709_bac66cacb9e9["__init__()"] 6e491709_d60f_689d_8a1a_c760b54fd120["InMemoryVectorStore"] 6927944c_3d1a_9e9a_e709_bac66cacb9e9 -->|defined in| 6e491709_d60f_689d_8a1a_c760b54fd120 style 6927944c_3d1a_9e9a_e709_bac66cacb9e9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/vectorstores/in_memory.py lines 161–170
def __init__(self, embedding: Embeddings) -> None:
"""Initialize with the given embedding function.
Args:
embedding: embedding function to use.
"""
# TODO: would be nice to change to
# dict[str, Document] at some point (will be a breaking change)
self.store: dict[str, dict[str, Any]] = {}
self.embedding = embedding
Domain
Subdomains
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/core/langchain_core/vectorstores/in_memory.py.
Where is __init__() defined?
__init__() is defined in libs/core/langchain_core/vectorstores/in_memory.py at line 161.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free