nat.cli.register_workflow#
Attributes#
Functions#
|
Register a workflow with optional framework_wrappers for automatic profiler hooking. |
|
|
|
Register a front end which is responsible for hosting a workflow. |
|
Register a workflow with optional framework_wrappers for automatic profiler hooking. |
|
Register a per-user function with optional framework_wrappers for automatic profiler hooking. |
|
Register a function group with optional framework_wrappers for automatic profiler hooking. |
|
Register a per-user function group with optional framework_wrappers for automatic profiler hooking. |
|
Register a middleware component. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Register an eval callback factory for a telemetry exporter config type. |
|
Register an optimizer callback factory for a telemetry exporter 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_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_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_client(
- config_type: type[nat.data_models.embedder.EmbedderBaseConfigT],
- wrapper_type: nat.builder.framework_enum.LLMFrameworkEnum | str,
- register_dataset_loader(
- config_type: type[nat.data_models.dataset_handler.EvalDatasetBaseConfigT],
- register_trajectory_builder(
- config_type: type[nat.data_models.finetuning.TrajectoryBuilderConfigT],
- 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],
- register_eval_callback(
- config_type: type[nat.cli.type_registry.TelemetryExporterConfigT],
Register an eval callback factory for a telemetry exporter config type.
The decorated function receives the exporter config and returns an
EvalCallback.
- register_optimizer_callback(
- config_type: type[nat.cli.type_registry.TelemetryExporterConfigT],
Register an optimizer callback factory for a telemetry exporter config type.
The decorated function receives the exporter config (and optional keyword arguments such as
dataset_name) and returns anOptimizerCallback.