id
stringlengths
14
15
text
stringlengths
49
2.47k
source
stringlengths
61
166
fe80261d16c7-0
langchain.retrievers.zilliz.ZillizRetriever¶ class langchain.retrievers.zilliz.ZillizRetriever[source]¶ Bases: BaseRetriever Retriever for the Zilliz API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. para...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
fe80261d16c7-1
You can use these to eg identify a specific instance of a retriever with its use case. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ add_texts(texts: List[str], metadatas: Optional[List[dict]] = None) → N...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
fe80261d16c7-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
fe80261d16c7-3
classmethod from_orm(obj: Any) → Model¶ get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to find relevant documents for :param call...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
fe80261d16c7-4
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmet...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
fe80261d16c7-5
property lc_serializable: bool¶ Return whether or not the class is serializable.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html
3b7338d50401-0
langchain.retrievers.docarray.SearchType¶ class langchain.retrievers.docarray.SearchType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶ Enumerator of the types of search to perform. similarity = 'similarity'¶ mmr = 'mmr'¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.SearchType.html
0c6c909fca4d-0
langchain.retrievers.bm25.default_preprocessing_func¶ langchain.retrievers.bm25.default_preprocessing_func(text: str) → List[str][source]¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.bm25.default_preprocessing_func.html
278007162040-0
langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER¶ langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER(op_name: str) → Callable[source]¶ Default composer for logical operators. Parameters op_name – Name of the operator. Returns Callable that takes a list of arguments and returns a string.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER.html
fc6eaf810d5c-0
langchain.retrievers.kendra.DocumentAttribute¶ class langchain.retrievers.kendra.DocumentAttribute[source]¶ Bases: BaseModel A document attribute. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param Key: s...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.DocumentAttribute.html
fc6eaf810d5c-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.DocumentAttribute.html
fc6eaf810d5c-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.DocumentAttribute.html
cea3a7604e09-0
langchain.retrievers.kendra.clean_excerpt¶ langchain.retrievers.kendra.clean_excerpt(excerpt: str) → str[source]¶ Cleans an excerpt from Kendra. Parameters excerpt – The excerpt to clean. Returns The cleaned excerpt.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.clean_excerpt.html
2404fc1c63a1-0
langchain.retrievers.self_query.weaviate.WeaviateTranslator¶ class langchain.retrievers.self_query.weaviate.WeaviateTranslator[source]¶ Translate the internal query language elements to valid filters. Attributes allowed_comparators allowed_operators Subset of allowed logical operators. Methods __init__() visit_comparis...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.weaviate.WeaviateTranslator.html
5bb74c07ec7b-0
langchain.retrievers.vespa_retriever.VespaRetriever¶ class langchain.retrievers.vespa_retriever.VespaRetriever[source]¶ Bases: BaseRetriever Retriever that uses Vespa. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a vali...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
5bb74c07ec7b-1
Asynchronously get documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as a...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
5bb74c07ec7b-2
Duplicate a model, optionally choose which fields to include, exclude and change. Parameters include – fields to include in new model exclude – fields to exclude from new model, as with values this takes precedence over include update – values to change/add in the new model. Note: the data is not validated before creat...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
5bb74c07ec7b-3
from. Defaults to None. _filter (Optional[str]) – Document filter condition expressed in YQL. Defaults to None. yql (Optional[str]) – Full YQL query to be used. Should not be specified if _filter or sources are specified. Defaults to None. kwargs (Any) – Keyword arguments added to query body. Returns Instantiated Vespa...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
5bb74c07ec7b-4
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
5bb74c07ec7b-5
classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain.schema.runnable.Input, ~langchain.schema.runnable.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException]] = (<class 'Exception'>,)) → RunnableWithFallbacks[Input, Out...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.vespa_retriever.VespaRetriever.html
1b6c7a0c7e16-0
langchain.retrievers.kendra.QueryResultItem¶ class langchain.retrievers.kendra.QueryResultItem[source]¶ Bases: ResultItem A Query API result item. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param Additi...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.QueryResultItem.html
1b6c7a0c7e16-1
Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.QueryResultItem.html
1b6c7a0c7e16-2
Document attributes dict. get_excerpt() → str[source]¶ Document excerpt or passage original content as retrieved by Kendra. get_title() → str[source]¶ Document title. json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_al...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.QueryResultItem.html
1b6c7a0c7e16-3
Converts this item to a Document. classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.QueryResultItem.html
a23c1b535596-0
langchain.retrievers.self_query.chroma.ChromaTranslator¶ class langchain.retrievers.self_query.chroma.ChromaTranslator[source]¶ Translate internal query language elements to valid filters. Attributes allowed_comparators Subset of allowed logical comparators. allowed_operators Subset of allowed logical operators. Method...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.chroma.ChromaTranslator.html
195f4bd1365f-0
langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever¶ class langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever[source]¶ Bases: BaseRetriever Retriever that combines embedding similarity with recency in retrieving values. Create a new model by parsing and validating in...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
195f4bd1365f-1
and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a retriever with its use case. param vectorstore: langchain.vectorstores.base.VectorStore [Required]¶ The vectorstore to store documents and determine salience. async aadd_documents(documents: List[Docu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
195f4bd1365f-2
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
195f4bd1365f-3
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. classmethod from_orm(obj: Any) → Model¶ get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Docum...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
195f4bd1365f-4
Generate a JSON representation of the model, include and exclude arguments as per dict(). encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps(). classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
195f4bd1365f-5
serialized kwargs. These attributes must be accepted by the constructor. property lc_namespace: List[str]¶ Return the namespace of the langchain object. eg. [“langchain”, “llms”, “openai”] property lc_secrets: Dict[str, str]¶ Return a map of constructor argument names to secret ids. eg. {“openai_api_key”: “OPENAI_API_K...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever.html
3a30885b428c-0
langchain.retrievers.document_compressors.cohere_rerank.CohereRerank¶ class langchain.retrievers.document_compressors.cohere_rerank.CohereRerank[source]¶ Bases: BaseDocumentCompressor DocumentCompressor that uses Cohere’s rerank API to compress documents. Create a new model by parsing and validating input data from key...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.cohere_rerank.CohereRerank.html
3a30885b428c-1
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶ Duplicate a model, optionally...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.cohere_rerank.CohereRerank.html
3a30885b428c-2
classmethod from_orm(obj: Any) → Model¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_n...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.cohere_rerank.CohereRerank.html
93e5462ca25b-0
langchain.retrievers.svm.create_index¶ langchain.retrievers.svm.create_index(contexts: List[str], embeddings: Embeddings) → ndarray[source]¶ Create an index of embeddings for a list of contexts. Parameters contexts – List of contexts to embed. embeddings – Embeddings model to use. Returns Index of embeddings.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.create_index.html
d98f8a29568b-0
langchain.retrievers.kendra.combined_text¶ langchain.retrievers.kendra.combined_text(item: ResultItem) → str[source]¶ Combines a ResultItem title and excerpt into a single string. Parameters item – the ResultItem of a Kendra search. Returns A combined text of the title and excerpt of the given item.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.combined_text.html
51d8c7f3004d-0
langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever¶ class langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever[source]¶ Bases: BaseRetriever Pinecone Hybrid Search Retriever. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationErro...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
51d8c7f3004d-1
add_texts(texts: List[str], ids: Optional[List[str]] = None, metadatas: Optional[List[dict]] = None) → None[source]¶ async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document]¶ Asynchronously get ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
51d8c7f3004d-2
Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
51d8c7f3004d-3
:param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments to the handlers defined in callbacks. Parameters metadata – Optional metadata associated with the retriever. Defaults to None This metadata will be a...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
51d8c7f3004d-4
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedN...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
a278aae2e5fd-0
langchain.retrievers.svm.SVMRetriever¶ class langchain.retrievers.svm.SVMRetriever[source]¶ Bases: BaseRetriever SVM Retriever. Largely based on https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.ipynb Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if th...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.SVMRetriever.html
a278aae2e5fd-1
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document]¶ Asynchronously get documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.SVMRetriever.html
a278aae2e5fd-2
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶ Duplicate a model, optionally...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.SVMRetriever.html
a278aae2e5fd-3
Retrieve documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments t...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.SVMRetriever.html
a278aae2e5fd-4
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.svm.SVMRetriever.html
8222ffaa37d6-0
langchain.retrievers.contextual_compression.ContextualCompressionRetriever¶ class langchain.retrievers.contextual_compression.ContextualCompressionRetriever[source]¶ Bases: BaseRetriever Retriever that wraps a base retriever and compresses the results. Create a new model by parsing and validating input data from keywor...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html
8222ffaa37d6-1
Asynchronously get documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as a...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html
8222ffaa37d6-2
Duplicate a model, optionally choose which fields to include, exclude and change. Parameters include – fields to include in new model exclude – fields to exclude from new model, as with values this takes precedence over include update – values to change/add in the new model. Note: the data is not validated before creat...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html
8222ffaa37d6-3
and passed as arguments to the handlers defined in callbacks. Returns List of relevant documents invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = Non...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html
8222ffaa37d6-4
to_json_not_implemented() → SerializedNotImplemented¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.contextual_compression.ContextualCompressionRetriever.html
8bd7bae817c7-0
langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever¶ class langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever[source]¶ Bases: BaseRetriever Retriever for the Azure Cognitive Search service. Create a new model by parsing and validating input data from keyword arguments. Raise...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html
8bd7bae817c7-1
use case. param top_k: Optional[int] = None¶ Number of results to retrieve. Set to None to retrieve all results. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ async aget_relevant_documents(query: str, *, ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html
8bd7bae817c7-2
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html
8bd7bae817c7-3
Retrieve documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments t...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html
8bd7bae817c7-4
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html
f3b2a67c4bb3-0
langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever¶ class langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever[source]¶ Bases: BaseRetriever Retriever for the Google Cloud Enterprise Search Service API. For the detailed explanation of the Enterpr...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
f3b2a67c4bb3-1
and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a retriever with its use case. param project_id: str [Required]¶ Google Cloud Project ID. param query_expansion_condition: int = 1¶ Specification to determine under which conditions query expansion shou...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
f3b2a67c4bb3-2
use case. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = Non...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
f3b2a67c4bb3-3
Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
f3b2a67c4bb3-4
:param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments to the handlers defined in callbacks. Parameters metadata – Optional metadata associated with the retriever. Defaults to None This metadata will be a...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
f3b2a67c4bb3-5
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedN...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
ee88fcc3c014-0
langchain.retrievers.kendra.RetrieveResult¶ class langchain.retrievers.kendra.RetrieveResult[source]¶ Bases: BaseModel Represents an Amazon Kendra Retrieve API search result, which is composed of: relevant passages or text excerpts given an input query. Create a new model by parsing and validating input data from keywo...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResult.html
ee88fcc3c014-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResult.html
ee88fcc3c014-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResult.html
075fe2e90454-0
langchain.retrievers.milvus.MilvusRetriever¶ class langchain.retrievers.milvus.MilvusRetriever[source]¶ Bases: BaseRetriever Retriever that uses the Milvus API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html
075fe2e90454-1
add_texts(texts: List[str], metadatas: Optional[List[dict]] = None) → None[source]¶ Add text to the Milvus store Parameters texts (List[str]) – The text metadatas (List[dict]) – Metadata dicts, must line up with existing store async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html
075fe2e90454-2
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html
075fe2e90454-3
Retrieve documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments t...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html
075fe2e90454-4
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetriever.html
0c0c618bf2ff-0
langchain.retrievers.self_query.myscale.MyScaleTranslator¶ class langchain.retrievers.self_query.myscale.MyScaleTranslator(metadata_key: str = 'metadata')[source]¶ Translate internal query language elements to valid filters. Attributes allowed_comparators allowed_operators Subset of allowed logical operators. map_dict ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html
f72489ae6287-0
langchain.retrievers.multi_query.LineListOutputParser¶ class langchain.retrievers.multi_query.LineListOutputParser[source]¶ Bases: PydanticOutputParser Output parser for a list of lines. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be pa...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html
f72489ae6287-1
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html
f72489ae6287-2
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html
f72489ae6287-3
Structured output. parse_with_prompt(completion: str, prompt: PromptValue) → Any¶ Parse the output of an LLM call with the input prompt for context. The prompt is largely provided in the event the OutputParser wants to retry or fix the output in some way, and needs information from the prompt to do so. Parameters compl...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html
f72489ae6287-4
eg. [“langchain”, “llms”, “openai”] property lc_secrets: Dict[str, str]¶ Return a map of constructor argument names to secret ids. eg. {“openai_api_key”: “OPENAI_API_KEY”} property lc_serializable: bool¶ Return whether or not the class is serializable.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.LineListOutputParser.html
734797a5b93c-0
langchain.retrievers.document_compressors.chain_filter.default_get_input¶ langchain.retrievers.document_compressors.chain_filter.default_get_input(query: str, doc: Document) → Dict[str, Any][source]¶ Return the compression chain input.
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_filter.default_get_input.html
70142e5ca902-0
langchain.retrievers.milvus.MilvusRetreiver¶ langchain.retrievers.milvus.MilvusRetreiver(*args: Any, **kwargs: Any) → MilvusRetriever[source]¶ Deprecated MilvusRetreiver. Please use MilvusRetriever (‘i’ before ‘e’) instead. Parameters *args – **kwargs – Returns MilvusRetriever
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetreiver.html
1a23ba80b13f-0
langchain.retrievers.kendra.AdditionalResultAttributeValue¶ class langchain.retrievers.kendra.AdditionalResultAttributeValue[source]¶ Bases: BaseModel The value of an additional result attribute. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data can...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AdditionalResultAttributeValue.html
1a23ba80b13f-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AdditionalResultAttributeValue.html
1a23ba80b13f-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AdditionalResultAttributeValue.html
b5c558342dce-0
langchain.retrievers.parent_document_retriever.ParentDocumentRetriever¶ class langchain.retrievers.parent_document_retriever.ParentDocumentRetriever[source]¶ Bases: BaseRetriever Fetches small chunks, then fetches their parent documents. When splitting documents for retrieval, there are often conflicting desires: You m...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-1
vectorstore=vectorstore, docstore=store, child_splitter=child_splitter, parent_splitter=parent_splitter, ) Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param child_splitter: langchain.text_splitter.TextSp...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-2
The underlying vectorstore to use to store small chunks and their embedding vectors async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ add_documents(documents: List[Document], ids: Optional[List[str]], add_to_...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-3
and passed as arguments to the handlers defined in callbacks. Returns List of relevant documents async ainvoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶ async astream(input: Input, config: Optional[RunnableConfig] = None) → AsyncIterator[Output]¶ batch(inputs: List[Input], config: Optional[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-4
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-5
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
b5c558342dce-6
classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain.schema.runnable.Input, ~langchain.schema.runnable.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException]] = (<class 'Exception'>,)) → RunnableWithFallbacks[Input, Out...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.parent_document_retriever.ParentDocumentRetriever.html
0a2a39c1559f-0
langchain.retrievers.docarray.DocArrayRetriever¶ class langchain.retrievers.docarray.DocArrayRetriever[source]¶ Bases: BaseRetriever Retriever for DocArray Document Indices. Currently, supports 5 backends: InMemoryExactNNIndex, HnswDocumentIndex, QdrantDocumentIndex, ElasticDocIndex, and WeaviateDocumentIndex. Paramete...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
0a2a39c1559f-1
param tags: Optional[List[str]] = None¶ Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a retriever with its use cas...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
0a2a39c1559f-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
0a2a39c1559f-3
classmethod from_orm(obj: Any) → Model¶ get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to find relevant documents for :param call...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
0a2a39c1559f-4
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmet...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
0a2a39c1559f-5
property lc_serializable: bool¶ Return whether or not the class is serializable. Examples using DocArrayRetriever¶ DocArray Retriever
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html
820d156bfba4-0
langchain.retrievers.ensemble.EnsembleRetriever¶ class langchain.retrievers.ensemble.EnsembleRetriever[source]¶ Bases: BaseRetriever This class ensemble the results of multiple retrievers by using rank fusion. Parameters retrievers – A list of retrievers to ensemble. weights – A list of weights corresponding to the ret...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html
820d156bfba4-1
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → List[Document]¶ Asynchronously get documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html
820d156bfba4-2
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html
820d156bfba4-3
Retrieve documents relevant to a query. :param query: string to find relevant documents for :param callbacks: Callback manager or list of callbacks :param tags: Optional list of tags associated with the retriever. Defaults to None These tags will be associated with each call to this retriever, and passed as arguments t...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html
820d156bfba4-4
rank_fusion(query: str, run_manager: CallbackManagerForRetrieverRun) → List[Document][source]¶ Retrieve the results of the retrievers and use rank_fusion_func to get the final result. Parameters query – The query to search for. Returns A list of reranked documents. classmethod schema(by_alias: bool = True, ref_template...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html
820d156bfba4-5
Return type list with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain.schema.runnable.Input, ~langchain.schema.runnable.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException]] = (<class 'Exception'>,)) → RunnableWithFallbacks[Input, Output]¶ property lc_attribu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.ensemble.EnsembleRetriever.html