id
stringlengths
14
15
text
stringlengths
44
2.47k
source
stringlengths
61
181
401fd9bd7d90-2
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. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-3
Default implementation of astream, which calls ainvoke. Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-4
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 other validation is performed. Behaves as if Config...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[s...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-6
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 lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-7
Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing output while input is still being generated. classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and lo...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
401fd9bd7d90-8
Examples using GoogleCloudEnterpriseSearchRetriever¶ Google Cloud Enterprise Search
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.google_cloud_enterprise_search.GoogleCloudEnterpriseSearchRetriever.html
ffce8d76119b-0
langchain.retrievers.document_compressors.chain_filter.LLMChainFilter¶ class langchain.retrievers.document_compressors.chain_filter.LLMChainFilter[source]¶ Bases: BaseDocumentCompressor Filter that drops documents that aren’t relevant to the query. Create a new model by parsing and validating input data from keyword ar...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_filter.LLMChainFilter.html
ffce8d76119b-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.chain_filter.LLMChainFilter.html
ffce8d76119b-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.chain_filter.LLMChainFilter.html
2473109c3f13-0
langchain.retrievers.self_query.supabase.SupabaseVectorTranslator¶ class langchain.retrievers.self_query.supabase.SupabaseVectorTranslator[source]¶ Translate Langchain filters to Supabase PostgREST filters. Attributes allowed_comparators Subset of allowed logical comparators. allowed_operators Subset of allowed logical...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.supabase.SupabaseVectorTranslator.html
ce367a2bba7a-0
langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever¶ class langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever[source]¶ Bases: BaseRetriever Elasticsearch retriever that uses BM25. To connect to an Elasticsearch instance that requires login credentials, including Elastic Cloud, use the E...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-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 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 retrieve...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-2
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 associated with each call to this retriever, and passed as arguments to the handlers defined in callbacks. Returns List of relevant documents async ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-3
Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if they can start producing output while input is still being generated. batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-4
deep – set to True to make a deep copy of the model Returns new model instance classmethod create(elasticsearch_url: str, index_name: str, k1: float = 2.0, b: float = 0.75) → ElasticSearchBM25Retriever[source]¶ Create a ElasticSearchBM25Retriever from a list of texts. Parameters elasticsearch_url – URL of the Elasticse...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-5
: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 to the handlers defined in callbacks. Par...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-6
by calling invoke() with each input. classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = No...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
ce367a2bba7a-7
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.base.Runnable[~langchain.schema.runnable.utils.Input, ~langchain.schema.runnable.utils.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,)) →...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.elastic_search_bm25.ElasticSearchBM25Retriever.html
f83239b0194c-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
f83239b0194c-1
Default implementation of abatch, which calls ainvoke N times. Subclasses should override this method if they can batch more efficiently. add_texts(texts: List[str], ids: Optional[List[str]] = None, metadatas: Optional[List[dict]] = None, namespace: Optional[str] = None) → None[source]¶ async aget_relevant_documents(qu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
f83239b0194c-2
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
f83239b0194c-3
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.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
f83239b0194c-4
namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to fi...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
f83239b0194c-5
classmethod lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a list of strings that describes the path to the object. map() → Runnable[List[Input], List[Output]]¶ Return a new Runnable that maps a list of inputs to a list of outputs, by calling invoke() with e...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
f83239b0194c-6
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_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html
cb931aaed0f2-0
langchain.retrievers.arxiv.ArxivRetriever¶ class langchain.retrievers.arxiv.ArxivRetriever[source]¶ Bases: BaseRetriever, ArxivAPIWrapper Arxiv retriever. It wraps load() to get_relevant_documents(). It uses all ArxivAPIWrapper arguments without any change. Create a new model by parsing and validating input data from k...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-1
Subclasses should override this method if they can batch more efficiently. async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Asynchronously get documents ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-2
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-3
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.arxiv.ArxivRetriever.html
cb931aaed0f2-4
namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to fi...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-5
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 lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-6
Parameters query – a plaintext search query 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[Ru...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
cb931aaed0f2-7
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶ property InputType: Type[langchain.schema.runnable.utils.Input]¶ property OutputType: Type[langchain.schema.runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.arxiv.ArxivRetriever.html
ef60a070741a-0
langchain.retrievers.document_compressors.chain_extract.NoOutputParser¶ class langchain.retrievers.document_compressors.chain_extract.NoOutputParser[source]¶ Bases: BaseOutputParser[str] Parse outputs that could return a null string of some sort. Create a new model by parsing and validating input data from keyword argu...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-1
to be different candidate outputs for a single model input. Returns Structured output. async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of astream, which calls ainvoke. Subclasses should override this method if they support str...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-2
Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently. bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Mode...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-3
namespace is [“langchain”, “llms”, “openai”] invoke(input: Union[str, BaseMessage], config: Optional[RunnableConfig] = None) → T¶ classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-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¶ parse_result(result: List[Generation], *, partial: bool = False) → T¶ Parse a list of candidate model Generations...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-5
to_json_not_implemented() → SerializedNotImplemented¶ transform(input: Iterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶ Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
ef60a070741a-6
For example,{“openai_api_key”: “OPENAI_API_KEY”} property output_schema: Type[pydantic.main.BaseModel]¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html
a225003d2866-0
langchain.retrievers.kendra.RetrieveResult¶ class langchain.retrievers.kendra.RetrieveResult[source]¶ Bases: BaseModel Amazon Kendra Retrieve API search result. It is composed of: relevant passages or text excerpts given an input query. Create a new model by parsing and validating input data from keyword arguments. Rai...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResult.html
a225003d2866-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
a225003d2866-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
d43a3277888c-0
langchain.retrievers.kendra.AmazonKendraRetriever¶ class langchain.retrievers.kendra.AmazonKendraRetriever[source]¶ Bases: BaseRetriever Amazon Kendra Index retriever. Parameters index_id – Kendra index id region_name – The aws region e.g., us-west-2. Fallsback to AWS_DEFAULT_REGION env variable or region specified in ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-1
param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the retriever. Defaults to None This metadata 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...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-2
: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.kendra.AmazonKendraRetriever.html
d43a3277888c-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-4
the new model: you should trust this data 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[boo...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-5
and passed as arguments to the handlers defined in callbacks. Returns List of relevant documents invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶ classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-6
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, **kwargs: Optional[Any...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
d43a3277888c-7
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶ property InputType: Type[langchain.schema.runnable.utils.Input]¶ property OutputType: Type[langchain.schema.runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html
04bfcf81c581-0
langchain.retrievers.llama_index.LlamaIndexGraphRetriever¶ class langchain.retrievers.llama_index.LlamaIndexGraphRetriever[source]¶ Bases: BaseRetriever LlamaIndex graph data structure retriever. It is used for question-answering with sources over an LlamaIndex graph data structure. Create a new model by parsing and va...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-1
Subclasses should override this method if they can batch more efficiently. async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Asynchronously get documents ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-2
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-3
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.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-4
namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to fi...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-5
classmethod lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a list of strings that describes the path to the object. map() → Runnable[List[Input], List[Output]]¶ Return a new Runnable that maps a list of inputs to a list of outputs, by calling invoke() with e...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
04bfcf81c581-6
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_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.llama_index.LlamaIndexGraphRetriever.html
32d95eebfbe1-0
langchain.retrievers.self_query.weaviate.WeaviateTranslator¶ class langchain.retrievers.self_query.weaviate.WeaviateTranslator[source]¶ Translate Weaviate internal query language elements to valid filters. Attributes allowed_comparators allowed_operators Subset of allowed logical operators. Methods __init__() visit_com...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.weaviate.WeaviateTranslator.html
05ff732c3a01-0
langchain.retrievers.multi_query.MultiQueryRetriever¶ class langchain.retrievers.multi_query.MultiQueryRetriever[source]¶ Bases: BaseRetriever Given a query, use an LLM to write a set of queries. Retrieve docs for each query. Return the unique union of all retrieved docs. Create a new model by parsing and validating in...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-1
Subclasses should override this method if they can batch more efficiently. async agenerate_queries(question: str, run_manager: AsyncCallbackManagerForRetrieverRun) → List[str][source]¶ Generate queries based upon user input. Parameters question – user query Returns List of LLM generated queries that are similar to the ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-2
Default implementation of astream, which calls ainvoke. Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-3
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 other validation is performed. Behaves as if Config...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-4
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. classmethod from_llm(retriever: BaseRetriever, llm: BaseLLM, prompt: PromptTemplate = PromptTemplate(input_variables=['question'], template='You are an AI language model assistant. Your task is \n    to generate...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-5
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.multi_query.MultiQueryRetriever.html
05ff732c3a01-6
by calling invoke() with each input. classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = No...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
05ff732c3a01-7
Parameters documents – List of retrieved Documents Returns List of unique retrieved Documents 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_config(config: Optional[RunnableConfig] = No...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.multi_query.MultiQueryRetriever.html
c372e4d7682c-0
langchain.retrievers.self_query.vectara.process_value¶ langchain.retrievers.self_query.vectara.process_value(value: Union[int, float, str]) → str[source]¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.vectara.process_value.html
d492b9d72e54-0
langchain.retrievers.metal.MetalRetriever¶ class langchain.retrievers.metal.MetalRetriever[source]¶ Bases: BaseRetriever Metal API retriever. 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 client: Any...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
d492b9d72e54-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.metal.MetalRetriever.html
d492b9d72e54-2
jsonpatch ops that describe how the state of the run has changed in each step, and the final state of the run. The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default im...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
d492b9d72e54-3
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 creating the new model: you should trust this data deep – set to True to make a deep copy of the model Returns new model instance dict(*, i...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
d492b9d72e54-4
This metadata will be associated with each call to this retriever, and passed as arguments to the handlers defined in callbacks. Returns List of relevant documents invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶ classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, i...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
d492b9d72e54-5
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, **kwargs: Optional[Any...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
d492b9d72e54-6
with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶ property InputType: Type[langchain.schema.runnable.utils.Input]¶ property OutputType: Type[langchain.schema.runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.metal.MetalRetriever.html
39e4f71c5c4f-0
langchain.retrievers.knn.KNNRetriever¶ class langchain.retrievers.knn.KNNRetriever[source]¶ Bases: BaseRetriever KNN retriever. 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 embeddings: Embeddings [R...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
39e4f71c5c4f-1
Subclasses should override this method if they can batch more efficiently. async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Asynchronously get documents ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
39e4f71c5c4f-2
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
39e4f71c5c4f-3
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.knn.KNNRetriever.html
39e4f71c5c4f-4
For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
39e4f71c5c4f-5
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 lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
39e4f71c5c4f-6
Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing output while input is still being generated. classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and lo...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html
05a3320802f9-0
langchain.retrievers.web_research.QuestionListOutputParser¶ class langchain.retrievers.web_research.QuestionListOutputParser[source]¶ Bases: PydanticOutputParser Output parser for a list of numbered questions. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-1
to be different candidate outputs for a single model input. Returns Structured output. async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of astream, which calls ainvoke. Subclasses should override this method if they support str...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-2
Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently. bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Mode...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-3
namespace is [“langchain”, “llms”, “openai”] invoke(input: Union[str, BaseMessage], config: Optional[RunnableConfig] = None) → T¶ classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, ...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-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¶ parse_result(result: List[Generation], *, partial: bool = False) → T¶ Parse a list of candidate model Generations...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-5
to_json_not_implemented() → SerializedNotImplemented¶ transform(input: Iterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶ Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
05a3320802f9-6
For example,{“openai_api_key”: “OPENAI_API_KEY”} property output_schema: Type[pydantic.main.BaseModel]¶
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.QuestionListOutputParser.html
38a7adfd9607-0
langchain.retrievers.kendra.clean_excerpt¶ langchain.retrievers.kendra.clean_excerpt(excerpt: str) → str[source]¶ Clean 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
9c3012323e45-0
langchain.retrievers.zep.ZepRetriever¶ class langchain.retrievers.zep.ZepRetriever[source]¶ Bases: BaseRetriever Zep long-term memory store retriever. Search your user’s long-term chat history with Zep. Note: You will need to provide the user’s session_id to use this retriever. More on Zep: Zep provides long-term conve...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
9c3012323e45-1
param zep_client: Any = None¶ Zep client. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶ Default implementation of abatch, which calls ainvoke N times. Subclasses should override this me...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
9c3012323e45-2
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
9c3012323e45-3
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.zep.ZepRetriever.html
9c3012323e45-4
namespace is [“langchain”, “llms”, “openai”] get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶ Retrieve documents relevant to a query. :param query: string to fi...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
9c3012323e45-5
classmethod lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a list of strings that describes the path to the object. map() → Runnable[List[Input], List[Output]]¶ Return a new Runnable that maps a list of inputs to a list of outputs, by calling invoke() with e...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
9c3012323e45-6
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_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runna...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.zep.ZepRetriever.html
1dd8d314c01b-0
langchain.retrievers.web_research.LineList¶ class langchain.retrievers.web_research.LineList[source]¶ Bases: BaseModel List of questions. 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 lines: List[str...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.LineList.html
1dd8d314c01b-1
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. classmethod from_orm(obj: Any) → Model¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False,...
https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.web_research.LineList.html