nat.tool.retriever#
Attributes#
Classes#
Retriever tool which provides a common interface for different vectorstores. Its |
Functions#
|
Generate a description of what the tool will do based on how it is configured. |
|
Configure a NAT Retriever Tool which supports different clients such as Milvus and Nemo Retriever. |
Module Contents#
- logger#
- class RetrieverConfig(/, **data: Any)#
Bases:
nat.data_models.function.FunctionBaseConfig
Retriever tool which provides a common interface for different vectorstores. Its configuration uses clients, which are the vectorstore-specific implementaiton of the retriever interface.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- retriever: nat.data_models.component_ref.RetrieverRef = None#
- _get_description_from_config(config: RetrieverConfig) str #
Generate a description of what the tool will do based on how it is configured.
- async retriever_tool(
- config: RetrieverConfig,
- builder: nat.builder.builder.Builder,
Configure a NAT Retriever Tool which supports different clients such as Milvus and Nemo Retriever.
- Args:
config: A config object with required parameters ‘client’ and ‘client_config’ builder: A workflow builder object
- AIQRetrieverConfig#
- aiq_retriever_tool#