nat.builder.builder#

Classes#

UserManagerHolder

Builder

Helper class that provides a standard way to create an ABC using

EvalBuilder

Helper class that provides a standard way to create an ABC using

Module Contents#

class UserManagerHolder(context: nat.builder.context.Context)#
_context#
get_id()#
class Builder#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstractmethod add_function(
name: str | nat.data_models.component_ref.FunctionRef,
config: nat.data_models.function.FunctionBaseConfig,
) nat.builder.function.Function#
Async:

abstractmethod add_function_group(
name: str | nat.data_models.component_ref.FunctionGroupRef,
config: nat.data_models.function.FunctionGroupBaseConfig,
) nat.builder.function.FunctionGroup#
Async:

abstractmethod get_function(
name: str | nat.data_models.component_ref.FunctionRef,
) nat.builder.function.Function#
Async:

abstractmethod get_function_group(
name: str | nat.data_models.component_ref.FunctionGroupRef,
) nat.builder.function.FunctionGroup#
Async:

async get_functions(
function_names: collections.abc.Sequence[str | nat.data_models.component_ref.FunctionRef],
) list[nat.builder.function.Function]#
async get_function_groups(
function_group_names: collections.abc.Sequence[str | nat.data_models.component_ref.FunctionGroupRef],
) list[nat.builder.function.FunctionGroup]#
abstractmethod get_function_config(
name: str | nat.data_models.component_ref.FunctionRef,
) nat.data_models.function.FunctionBaseConfig#
abstractmethod get_function_group_config(
name: str | nat.data_models.component_ref.FunctionGroupRef,
) nat.data_models.function.FunctionGroupBaseConfig#
abstractmethod set_workflow(
config: nat.data_models.function.FunctionBaseConfig,
) nat.builder.function.Function#
Async:

abstractmethod get_workflow() nat.builder.function.Function#
abstractmethod get_workflow_config() nat.data_models.function.FunctionBaseConfig#
abstractmethod get_tools(
tool_names: collections.abc.Sequence[str | nat.data_models.component_ref.FunctionRef | nat.data_models.component_ref.FunctionGroupRef],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) list[Any]#
Async:

abstractmethod get_tool(
fn_name: str | nat.data_models.component_ref.FunctionRef,
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) Any#
Async:

abstractmethod add_llm(
name: str | nat.data_models.component_ref.LLMRef,
config: nat.data_models.llm.LLMBaseConfig,
) Any#
Async:

abstractmethod get_llm(
llm_name: str | nat.data_models.component_ref.LLMRef,
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) Any#
Async:

async get_llms(
llm_names: collections.abc.Sequence[str | nat.data_models.component_ref.LLMRef],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) list[Any]#
abstractmethod get_llm_config(
llm_name: str | nat.data_models.component_ref.LLMRef,
) nat.data_models.llm.LLMBaseConfig#
abstractmethod add_auth_provider(
name: str | nat.data_models.component_ref.AuthenticationRef,
config: nat.data_models.authentication.AuthProviderBaseConfig,
) nat.authentication.interfaces.AuthProviderBase#
Async:

abstractmethod get_auth_provider(
auth_provider_name: str | nat.data_models.component_ref.AuthenticationRef,
) nat.authentication.interfaces.AuthProviderBase#
Async:

async get_auth_providers(
auth_provider_names: list[str | nat.data_models.component_ref.AuthenticationRef],
)#
abstractmethod add_object_store(
name: str | nat.data_models.component_ref.ObjectStoreRef,
config: nat.data_models.object_store.ObjectStoreBaseConfig,
) nat.object_store.interfaces.ObjectStore#
Async:

async get_object_store_clients(
object_store_names: collections.abc.Sequence[str | nat.data_models.component_ref.ObjectStoreRef],
) list[nat.object_store.interfaces.ObjectStore]#

Return a list of all object store clients.

abstractmethod get_object_store_client(
object_store_name: str | nat.data_models.component_ref.ObjectStoreRef,
) nat.object_store.interfaces.ObjectStore#
Async:

abstractmethod get_object_store_config(
object_store_name: str | nat.data_models.component_ref.ObjectStoreRef,
) nat.data_models.object_store.ObjectStoreBaseConfig#
abstractmethod add_embedder(
name: str | nat.data_models.component_ref.EmbedderRef,
config: nat.data_models.embedder.EmbedderBaseConfig,
) None#
Async:

async get_embedders(
embedder_names: collections.abc.Sequence[str | nat.data_models.component_ref.EmbedderRef],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) list[Any]#
abstractmethod get_embedder(
embedder_name: str | nat.data_models.component_ref.EmbedderRef,
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) Any#
Async:

abstractmethod get_embedder_config(
embedder_name: str | nat.data_models.component_ref.EmbedderRef,
) nat.data_models.embedder.EmbedderBaseConfig#
abstractmethod add_memory_client(
name: str | nat.data_models.component_ref.MemoryRef,
config: nat.data_models.memory.MemoryBaseConfig,
) nat.memory.interfaces.MemoryEditor#
Async:

async get_memory_clients(
memory_names: collections.abc.Sequence[str | nat.data_models.component_ref.MemoryRef],
) list[nat.memory.interfaces.MemoryEditor]#

Return a list of memory clients for the specified names.

abstractmethod get_memory_client(
memory_name: str | nat.data_models.component_ref.MemoryRef,
) nat.memory.interfaces.MemoryEditor#
Async:

Return the instantiated memory client for the given name.

abstractmethod get_memory_client_config(
memory_name: str | nat.data_models.component_ref.MemoryRef,
) nat.data_models.memory.MemoryBaseConfig#
abstractmethod add_retriever(
name: str | nat.data_models.component_ref.RetrieverRef,
config: nat.data_models.retriever.RetrieverBaseConfig,
) None#
Async:

async get_retrievers(
retriever_names: collections.abc.Sequence[str | nat.data_models.component_ref.RetrieverRef],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str | None = None,
) list[nat.retriever.interface.Retriever]#
async get_retriever(
retriever_name: str | nat.data_models.component_ref.RetrieverRef,
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) Any#
async get_retriever(
retriever_name: str | nat.data_models.component_ref.RetrieverRef,
wrapper_type: None,
) nat.retriever.interface.Retriever
async get_retriever(
retriever_name: str | nat.data_models.component_ref.RetrieverRef,
) nat.retriever.interface.Retriever
abstractmethod get_retriever_config(
retriever_name: str | nat.data_models.component_ref.RetrieverRef,
) nat.data_models.retriever.RetrieverBaseConfig#
Async:

abstractmethod add_ttc_strategy(
name: str | nat.data_models.component_ref.TTCStrategyRef,
config: nat.data_models.ttc_strategy.TTCStrategyBaseConfig,
)#
Async:

abstractmethod get_ttc_strategy(
strategy_name: str | nat.data_models.component_ref.TTCStrategyRef,
pipeline_type: nat.experimental.test_time_compute.models.stage_enums.PipelineTypeEnum,
stage_type: nat.experimental.test_time_compute.models.stage_enums.StageTypeEnum,
) nat.experimental.test_time_compute.models.strategy_base.StrategyBase#
Async:

abstractmethod get_ttc_strategy_config(
strategy_name: str | nat.data_models.component_ref.TTCStrategyRef,
pipeline_type: nat.experimental.test_time_compute.models.stage_enums.PipelineTypeEnum,
stage_type: nat.experimental.test_time_compute.models.stage_enums.StageTypeEnum,
) nat.data_models.ttc_strategy.TTCStrategyBaseConfig#
Async:

abstractmethod get_user_manager() UserManagerHolder#
abstractmethod get_function_dependencies(
fn_name: str,
) nat.data_models.function_dependencies.FunctionDependencies#
abstractmethod get_function_group_dependencies(
fn_name: str,
) nat.data_models.function_dependencies.FunctionDependencies#
class EvalBuilder#

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstractmethod add_evaluator(
name: str,
config: nat.data_models.evaluator.EvaluatorBaseConfig,
)#
Async:

abstractmethod get_evaluator(evaluator_name: str) Any#
abstractmethod get_evaluator_config(
evaluator_name: str,
) nat.data_models.evaluator.EvaluatorBaseConfig#
abstractmethod get_max_concurrency() int#
abstractmethod get_output_dir() pathlib.Path#
abstractmethod get_all_tools(
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
) list[Any]#
Async: