id stringlengths 14 15 | text stringlengths 13 2.7k | source stringlengths 60 181 |
|---|---|---|
2f7e9cfce21d-0 | langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever¶
class langchain_community.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.
R... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-1 | Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
add_texts(texts: List[str], id... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-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, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_typ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-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_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-4 | 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_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-5 | This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langcha... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-6 | and passed as arguments to the handlers defined in callbacks.
Returns
List of relevant documents
invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶
Transform a single input into an output. Override to implement.
Parameters
input – The input to the runnable.
config – A config to use when invok... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-7 | 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_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-8 | Bind config to a Runnable, returning a new Runnable.
with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶
Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A se... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
2f7e9cfce21d-9 | between retries
stop_after_attempt – The maximum number of attempts to make before giving up
Returns
A new Runnable that retries the original runnable on exceptions.
with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶
Bind input and output types... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pinecone_hybrid_search.PineconeHybridSearchRetriever.html |
9f58d5472c41-0 | langchain.retrievers.self_query.opensearch.OpenSearchTranslator¶
class langchain.retrievers.self_query.opensearch.OpenSearchTranslator[source]¶
Translate OpenSearch internal query domain-specific
language elements to valid filters.
Attributes
allowed_comparators
Subset of allowed logical comparators.
allowed_operators
... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.opensearch.OpenSearchTranslator.html |
3678817a2509-0 | langchain.retrievers.self_query.base.SelfQueryRetriever¶
class langchain.retrievers.self_query.base.SelfQueryRetriever[source]¶
Bases: BaseRetriever, BaseModel
Retriever that uses a vector store and an LLM to generate
the vector store queries.
Create a new model by parsing and validating input data from keyword argumen... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-1 | use case.
param use_original_query: bool = False¶
Use original query instead of the revised new query from LLM
param vectorstore: langchain_core.vectorstores.VectorStore [Required]¶
The underlying vector store from which documents will be retrieved.
param verbose: bool = False¶
async abatch(inputs: List[Input], config:... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-2 | Default implementation of ainvoke, calls invoke from a thread.
The default implementation allows usage of async code even if
the runnable did not implement a native async version of invoke.
Subclasses should override this method if they can run asynchronously.
async astream(input: Input, config: Optional[RunnableConfig... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-3 | include_types – Only include logs with these types.
include_tags – Only include logs with these tags.
exclude_names – Exclude logs with these names.
exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-4 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-5 | Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
classmethod from_llm(llm: BaseLanguageModel, vectorstore: VectorStore, document_contents: str, metadata_field_info: Sequence[Union[AttributeInfo, dict]], structured_query_translator: Optional[Visitor] = None, ch... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-6 | Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate output.
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) → L... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-7 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
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_defa... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-8 | 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]) → Iterator[Output]¶
Default implementation of stream, which calls invoke.
Subclasses should override t... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-9 | fallback in order, upon failures.
with_listeners(*, on_start: Optional[Listener] = None, on_end: Optional[Listener] = None, on_error: Optional[Listener] = None) → Runnable[Input, Output]¶
Bind lifecycle listeners to a Runnable, returning a new Runnable.
on_start: Called before the runnable starts running, with the Run ... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
3678817a2509-10 | property OutputType: Type[langchain_core.runnables.utils.Output]¶
The type of output this runnable produces specified as a type annotation.
property config_specs: List[langchain_core.runnables.utils.ConfigurableFieldSpec]¶
List configurable fields for this runnable.
property input_schema: Type[pydantic.main.BaseModel]¶... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
d2d9fab8ac2e-0 | langchain.retrievers.self_query.dashvector.DashvectorTranslator¶
class langchain.retrievers.self_query.dashvector.DashvectorTranslator[source]¶
Logic for converting internal query language elements to valid filters.
Attributes
allowed_comparators
allowed_operators
map_dict
Methods
__init__()
visit_comparison(comparison... | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.dashvector.DashvectorTranslator.html |
d71422958bd3-0 | langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever¶
class langchain_community.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 mod... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-1 | Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
async aget_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_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-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_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-4 | 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_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-5 | This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langcha... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-6 | and passed as arguments to the handlers defined in callbacks.
Returns
List of relevant documents
invoke(input: str, config: Optional[RunnableConfig] = None) → List[Document]¶
Transform a single input into an output. Override to implement.
Parameters
input – The input to the runnable.
config – A config to use when invok... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-7 | 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_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-8 | Bind config to a Runnable, returning a new Runnable.
with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶
Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A se... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
d71422958bd3-9 | between retries
stop_after_attempt – The maximum number of attempts to make before giving up
Returns
A new Runnable that retries the original runnable on exceptions.
with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶
Bind input and output types... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.llama_index.LlamaIndexGraphRetriever.html |
a2b7a7a11c7c-0 | langchain_community.retrievers.pubmed.PubMedRetriever¶
class langchain_community.retrievers.pubmed.PubMedRetriever[source]¶
Bases: BaseRetriever, PubMedAPIWrapper
PubMed API retriever.
It wraps load() to get_relevant_documents().
It uses all PubMedAPIWrapper arguments without any change.
Create a new model by parsing a... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-1 | use case.
param top_k_results: int = 3¶
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-2 | Subclasses should override this method if they can run asynchronously.
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 streaming output.
a... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-3 | exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
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 sho... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-4 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-5 | classmethod from_orm(obj: Any) → Model¶
get_input_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate input to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic input schema that depend... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-6 | :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_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-7 | lazy_load(query: str) → Iterator[dict]¶
Search PubMed for documents matching the query.
Return an iterator of dictionaries containing the document metadata.
lazy_load_docs(query: str) → Iterator[Document]¶
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identif... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-8 | stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶
Default implementation of stream, which calls invoke.
Subclasses should override this method if they support streaming output.
to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶
to_json_not_implem... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-9 | Bind lifecycle listeners to a Runnable, returning a new Runnable.
on_start: Called before the runnable starts running, with the Run object.
on_end: Called after the runnable finishes running, with the Run object.
on_error: Called if the runnable throws an error, with the Run object.
The Run object contains information ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
a2b7a7a11c7c-10 | property input_schema: Type[pydantic.main.BaseModel]¶
The type of input this runnable accepts specified as a pydantic model.
property lc_attributes: Dict¶
List of attribute names that should be included in the serialized kwargs.
These attributes must be accepted by the constructor.
property lc_secrets: Dict[str, str]¶
... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.pubmed.PubMedRetriever.html |
27aedc7d84f3-0 | langchain_community.retrievers.arxiv.ArxivRetriever¶
class langchain_community.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 validati... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-1 | Default implementation runs ainvoke in parallel using asyncio.gather.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
async aget_relevant_documents(... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-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_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-4 | 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_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-5 | This method allows to get an input schema for a specific configuration.
Parameters
config – A config to use when generating the schema.
Returns
A pydantic model that can be used to validate input.
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langcha... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-6 | and passed as arguments to the handlers defined in callbacks.
Returns
List of relevant documents
get_summaries_as_docs(query: str) → List[Document]¶
Performs an arxiv search and returns list of
documents, with summaries as the content.
If an error occurs or no documents found, error text
is returned instead. Wrapper fo... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-7 | 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_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-8 | 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_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-9 | exceptions_to_handle – A tuple of exception types to handle.
Returns
A new Runnable that will try the original runnable, and then each
fallback in order, upon failures.
with_listeners(*, on_start: Optional[Listener] = None, on_end: Optional[Listener] = None, on_error: Optional[Listener] = None) → Runnable[Input, Output... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
27aedc7d84f3-10 | The type of input this runnable accepts specified as a type annotation.
property OutputType: Type[langchain_core.runnables.utils.Output]¶
The type of output this runnable produces specified as a type annotation.
property config_specs: List[langchain_core.runnables.utils.ConfigurableFieldSpec]¶
List configurable fields ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.arxiv.ArxivRetriever.html |
c2482fc72a80-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 |
da210bd829e5-0 | langchain_community.retrievers.vespa_retriever.VespaRetriever¶
class langchain_community.retrievers.vespa_retriever.VespaRetriever[source]¶
Bases: BaseRetriever
Vespa retriever.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to f... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-1 | Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
async aget_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_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-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_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-4 | 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_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-5 | Instantiate retriever from params.
Parameters
url (str) – Vespa app URL.
content_field (str) – Field in results to return as Document page_content.
k (Optional[int]) – Number of Documents to return. Defaults to None.
metadata_fields (Sequence[str] or "*") – Fields in results to include in
document metadata. Defaults to... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-6 | Get a pydantic model that can be used to validate output to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic output schema that depends on which
configuration the runnable is invoked with.
This method allows to get an output schema for a specific co... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-7 | purposes, ‘max_concurrency’ for controlling how much work to do
in parallel, and other keys. Please refer to the RunnableConfig
for more details.
Returns
The output of the runnable.
classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]]... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-8 | 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_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-9 | Returns
A new Runnable that will try the original runnable, and then each
fallback in order, upon failures.
with_listeners(*, on_start: Optional[Listener] = None, on_end: Optional[Listener] = None, on_error: Optional[Listener] = None) → Runnable[Input, Output]¶
Bind lifecycle listeners to a Runnable, returning a new Ru... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
da210bd829e5-10 | The type of input this runnable accepts specified as a type annotation.
property OutputType: Type[langchain_core.runnables.utils.Output]¶
The type of output this runnable produces specified as a type annotation.
property config_specs: List[langchain_core.runnables.utils.ConfigurableFieldSpec]¶
List configurable fields ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.vespa_retriever.VespaRetriever.html |
6930dd2aa9ce-0 | langchain_community.retrievers.zep.ZepRetriever¶
class langchain_community.retrievers.zep.ZepRetriever[source]¶
Bases: BaseRetriever
Zep MemoryStore Retriever.
Search your user’s long-term chat history with Zep.
Zep offers both simple semantic search and Maximal Marginal Relevance (MMR)
reranking of search results.
Not... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-1 | use case.
param mmr_lambda: Optional[float] = None¶
Lambda value for MMR search.
param search_scope: langchain_community.retrievers.zep.SearchScope = SearchScope.messages¶
Which documents to search. Messages or Summaries?
param search_type: langchain_community.retrievers.zep.SearchType = SearchType.similarity¶
Type of ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-2 | 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_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-3 | Stream all output from a runnable, as reported to the callback system.
This includes all inner runs of LLMs, Retrievers, Tools, etc.
Output is streamed as Log objects, which include a list of
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... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-4 | bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
config_schema(*, include: Optional[Sequence[str]] = None) → Type[BaseModel]¶
The type of config this runnable accepts specified as a pydantic model.
To mark a field as configurable, see the configurable_fields
and con... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-5 | 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_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-6 | Get a pydantic model that can be used to validate output to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic output schema that depends on which
configuration the runnable is invoked with.
This method allows to get an output schema for a specific co... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-7 | Returns
The output of the runnable.
classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclu... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-8 | 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]) → Iterator[Output]¶
Default implementation of stream, which calls invoke.
Subclasses should override t... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-9 | fallback in order, upon failures.
with_listeners(*, on_start: Optional[Listener] = None, on_end: Optional[Listener] = None, on_error: Optional[Listener] = None) → Runnable[Input, Output]¶
Bind lifecycle listeners to a Runnable, returning a new Runnable.
on_start: Called before the runnable starts running, with the Run ... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6930dd2aa9ce-10 | property OutputType: Type[langchain_core.runnables.utils.Output]¶
The type of output this runnable produces specified as a type annotation.
property config_specs: List[langchain_core.runnables.utils.ConfigurableFieldSpec]¶
List configurable fields for this runnable.
property input_schema: Type[pydantic.main.BaseModel]¶... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.zep.ZepRetriever.html |
6733744ef706-0 | langchain_community.retrievers.tavily_search_api.SearchDepth¶
class langchain_community.retrievers.tavily_search_api.SearchDepth(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Search depth as enumerator.
BASIC = 'basic'¶
ADVANCED = 'advanced'¶ | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.tavily_search_api.SearchDepth.html |
82a4df98d28c-0 | langchain.retrievers.self_query.deeplake.can_cast_to_float¶
langchain.retrievers.self_query.deeplake.can_cast_to_float(string: str) → bool[source]¶
Check if a string can be cast to a float. | https://api.python.langchain.com/en/latest/retrievers/langchain.retrievers.self_query.deeplake.can_cast_to_float.html |
5ec1f8e07dbe-0 | langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever¶
class langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever[source]¶
Bases: BaseRetriever
Azure Cognitive Search service retriever.
Create a new model by parsing and validating input data from keyword argu... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-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, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation run... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-2 | Subclasses should override this method if they can run asynchronously.
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 streaming output.
a... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-3 | exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
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 sho... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-4 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-5 | classmethod from_orm(obj: Any) → Model¶
get_input_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate input to the runnable.
Runnables that leverage the configurable_fields and configurable_alternatives
methods will have a dynamic input schema that depend... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-6 | :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_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-7 | 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_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-8 | 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_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-9 | added to the run.
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]¶
Create a new Runnable that retries the original runnable on exceptions.
Parameters
retry_if_exc... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
5ec1f8e07dbe-10 | property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model.
Examples using AzureCognitiveSearchRetriever¶
Azure Cognitive Search | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.azure_cognitive_search.AzureCognitiveSearchRetriever.html |
9c08f6b1ca58-0 | langchain_community.retrievers.kendra.Highlight¶
class langchain_community.retrievers.kendra.Highlight[source]¶
Bases: BaseModel
Information that highlights the keywords in the excerpt.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be par... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.kendra.Highlight.html |
9c08f6b1ca58-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_community.retrievers.kendra.Highlight.html |
9c08f6b1ca58-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_community.retrievers.kendra.Highlight.html |
f609a91a3808-0 | langchain_community.retrievers.kendra.clean_excerpt¶
langchain_community.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_community.retrievers.kendra.clean_excerpt.html |
6bac444d6f10-0 | langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever¶
class langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever[source]¶
Bases: BaseRetriever
Weaviate hybrid search retriever.
See the documentation:https://weaviate.io/blog/hybrid-search-explained
Create a n... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
6bac444d6f10-1 | use case.
param text_key: str [Required]¶
The name of the text key to use.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation runs ainvoke in parallel using asyncio.ga... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
6bac444d6f10-2 | The default implementation allows usage of async code even if
the runnable did not implement a native async version of invoke.
Subclasses should override this method if they can run asynchronously.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Def... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
6bac444d6f10-3 | include_tags – Only include logs with these tags.
exclude_names – Exclude logs with these names.
exclude_types – Exclude logs with these types.
exclude_tags – Exclude logs with these tags.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Out... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
6bac444d6f10-4 | configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali... | https://api.python.langchain.com/en/latest/retrievers/langchain_community.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.