InMemoryVectorstoreWithSearch Class — langchain Architecture
Architecture documentation for the InMemoryVectorstoreWithSearch class in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8a79270f_42fb_7a57_0a40_e13f5b02878f["InMemoryVectorstoreWithSearch"] 6e491709_d60f_689d_8a1a_c760b54fd120["InMemoryVectorStore"] 8a79270f_42fb_7a57_0a40_e13f5b02878f -->|extends| 6e491709_d60f_689d_8a1a_c760b54fd120 d1736cc5_5d04_ec6a_a15a_4a8a730c63dd["test_base.py"] 8a79270f_42fb_7a57_0a40_e13f5b02878f -->|defined in| d1736cc5_5d04_ec6a_a15a_4a8a730c63dd bfc3db68_2a96_682f_d606_0fcf9e00f190["similarity_search()"] 8a79270f_42fb_7a57_0a40_e13f5b02878f -->|method| bfc3db68_2a96_682f_d606_0fcf9e00f190
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/retrievers/self_query/test_base.py lines 64–75
class InMemoryVectorstoreWithSearch(InMemoryVectorStore):
@override
def similarity_search(
self,
query: str,
k: int = 4,
**kwargs: Any,
) -> list[Document]:
res = self.store.get(query)
if res is None:
return []
return [res]
Extends
Source
Frequently Asked Questions
What is the InMemoryVectorstoreWithSearch class?
InMemoryVectorstoreWithSearch is a class in the langchain codebase, defined in libs/langchain/tests/unit_tests/retrievers/self_query/test_base.py.
Where is InMemoryVectorstoreWithSearch defined?
InMemoryVectorstoreWithSearch is defined in libs/langchain/tests/unit_tests/retrievers/self_query/test_base.py at line 64.
What does InMemoryVectorstoreWithSearch extend?
InMemoryVectorstoreWithSearch extends InMemoryVectorStore.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free