MCPcopy Create free account
hub / github.com/ScienciaLAB/document-qa / as_retriever

Method as_retriever

document_qa/langchain.py:80–87  ·  view source on GitHub ↗

Create a retriever supporting ``similarity_with_embeddings``. Accepts the same keyword arguments as the base ``as_retriever``.

(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

78 """
79
80 def as_retriever(self, **kwargs: Any) -> AdvancedVectorStoreRetriever:
81 """Create a retriever supporting ``similarity_with_embeddings``.
82
83 Accepts the same keyword arguments as the base ``as_retriever``.
84 """
85 tags = kwargs.pop("tags", None) or []
86 tags.extend(self._get_retriever_tags())
87 return AdvancedVectorStoreRetriever(vectorstore=self, **kwargs, tags=tags)
88
89
90class ChromaAdvancedRetrieval(Chroma, AdvancedVectorStore):

Callers 4

analyse_queryMethod · 0.80
_get_contextMethod · 0.80

Calls 1

Tested by

no test coverage detected