nat.cli.register_workflow#

Attributes#

Functions#

register_telemetry_exporter(config_type)

Register a workflow with optional framework_wrappers for automatic profiler hooking.

register_logging_method(config_type)

register_front_end(config_type)

Register a front end which is responsible for hosting a workflow.

register_function(config_type[, framework_wrappers])

Register a workflow with optional framework_wrappers for automatic profiler hooking.

register_per_user_function(config_type, input_type[, ...])

Register a per-user function with optional framework_wrappers for automatic profiler hooking.

register_function_group(config_type[, framework_wrappers])

Register a function group with optional framework_wrappers for automatic profiler hooking.

register_per_user_function_group(config_type[, ...])

Register a per-user function group with optional framework_wrappers for automatic profiler hooking.

register_middleware(config_type)

Register a middleware component.

register_llm_provider(config_type)

register_auth_provider(config_type)

register_llm_client(config_type, wrapper_type)

register_embedder_provider(config_type)

register_embedder_client(config_type, wrapper_type)

register_evaluator(config_type)

register_memory(config_type)

register_object_store(config_type)

register_ttc_strategy(config_type)

register_trainer(config_type)

register_trainer_adapter(config_type)

register_trajectory_builder(config_type)

register_retriever_provider(config_type)

register_retriever_client(config_type, wrapper_type)

register_tool_wrapper(wrapper_type)

register_registry_handler(config_type)

Module Contents#

register_telemetry_exporter(
config_type: type[nat.cli.type_registry.TelemetryExporterConfigT],
)#

Register a workflow with optional framework_wrappers for automatic profiler hooking.

register_logging_method(
config_type: type[nat.cli.type_registry.LoggingMethodConfigT],
)#
register_front_end(
config_type: type[nat.data_models.front_end.FrontEndConfigT],
)#

Register a front end which is responsible for hosting a workflow.

register_function(
config_type: type[nat.data_models.function.FunctionConfigT],
framework_wrappers: list[nat.builder.framework_enum.LLMFrameworkEnum | str] | None = None,
)#

Register a workflow with optional framework_wrappers for automatic profiler hooking.

Args:

config_type: The function configuration type framework_wrappers: Optional list of framework wrappers for automatic profiler hooking

register_per_user_function(
config_type: type[nat.data_models.function.FunctionConfigT],
input_type: type | type[pydantic.BaseModel],
single_output_type: type | type[pydantic.BaseModel] | None = None,
streaming_output_type: type | type[pydantic.BaseModel] | None = None,
framework_wrappers: list[nat.builder.framework_enum.LLMFrameworkEnum | str] | None = None,
)#

Register a per-user function with optional framework_wrappers for automatic profiler hooking.

The per-user function is instantiated lazily on user’s first invocation. Each user will have a separate instance of the function. Schemas must be provided to enable OpenAPI documentation generation without a concrete instance.

Args:

config_type: The function configuration type input_type: The input type for the function (can be a type or a Pydantic model) single_output_type: The single output type for the function (can be a type or a Pydantic model) streaming_output_type: The streaming output type for the function (can be a type or a Pydantic model) framework_wrappers: Optional list of framework wrappers for automatic profiler hooking

register_function_group(
config_type: type[nat.data_models.function.FunctionGroupConfigT],
framework_wrappers: list[nat.builder.framework_enum.LLMFrameworkEnum | str] | None = None,
)#

Register a function group with optional framework_wrappers for automatic profiler hooking. Function groups share configuration/resources across multiple functions.

register_per_user_function_group(
config_type: type[nat.data_models.function.FunctionGroupConfigT],
framework_wrappers: list[nat.builder.framework_enum.LLMFrameworkEnum | str] | None = None,
)#

Register a per-user function group with optional framework_wrappers for automatic profiler hooking.

Per-user function groups are instantiated separately for each user, allowing for user-specific shared state across multiple functions within the group.

register_middleware(
config_type: type[nat.data_models.middleware.MiddlewareBaseConfigT],
)#

Register a middleware component.

Middleware provides middleware-style wrapping of calls with preprocessing and postprocessing logic. They are built as components that can be configured in YAML and referenced by name in configurations.

Args:

config_type: The middleware configuration type to register

Returns:

A decorator that wraps the build function as an async context manager

register_function_middleware#
register_llm_provider(
config_type: type[nat.data_models.llm.LLMBaseConfigT],
)#
register_auth_provider(
config_type: type[nat.data_models.authentication.AuthProviderBaseConfigT],
)#
register_llm_client(
config_type: type[nat.data_models.llm.LLMBaseConfigT],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
)#
register_embedder_provider(
config_type: type[nat.data_models.embedder.EmbedderBaseConfigT],
)#
register_embedder_client(
config_type: type[nat.data_models.embedder.EmbedderBaseConfigT],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
)#
register_evaluator(
config_type: type[nat.data_models.evaluator.EvaluatorBaseConfigT],
)#
register_memory(
config_type: type[nat.data_models.memory.MemoryBaseConfigT],
)#
register_object_store(
config_type: type[nat.data_models.object_store.ObjectStoreBaseConfigT],
)#
register_ttc_strategy(
config_type: type[nat.data_models.ttc_strategy.TTCStrategyBaseConfigT],
)#
register_trainer(
config_type: type[nat.data_models.finetuning.TrainerConfigT],
)#
register_trainer_adapter(
config_type: type[nat.data_models.finetuning.TrainerAdapterConfigT],
)#
register_trajectory_builder(
config_type: type[nat.data_models.finetuning.TrajectoryBuilderConfigT],
)#
register_retriever_provider(
config_type: type[nat.data_models.retriever.RetrieverBaseConfigT],
)#
register_retriever_client(
config_type: type[nat.data_models.retriever.RetrieverBaseConfigT],
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str | None,
)#
register_tool_wrapper(
wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
)#
register_registry_handler(
config_type: type[nat.data_models.registry_handler.RegistryHandlerBaseConfigT],
)#