nat.data_models.function#

Attributes#

Classes#

FunctionBaseConfig

Base configuration for functions.

FunctionGroupBaseConfig

Base configuration for function groups.

EmptyFunctionConfig

Base configuration for functions.

Module Contents#

class FunctionBaseConfig(/, **data: Any)#

Bases: nat.data_models.common.TypedBaseModel, nat.data_models.common.BaseModelRegistryTag

Base configuration for functions.

Attributes:
name: Optional display name for this function. Used in tracing and observability.

If not provided, the function type will be used.

middleware: List of function middleware names to apply to this function.

These must match names defined in the middleware section of the YAML configuration.

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 allow self as a field name.

name: str | None = None#
middleware: list[str] = None#
class FunctionGroupBaseConfig(/, **data: Any)#

Bases: nat.data_models.common.TypedBaseModel, nat.data_models.common.BaseModelRegistryTag

Base configuration for function groups.

Function groups enable sharing of configurations and resources across multiple functions.

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 allow self as a field name.

include: list[str] = None#
exclude: list[str] = None#
middleware: list[str] = None#
classmethod _validate_fields_include_exclude(value: list[str]) list[str]#
_validate_include_exclude()#
class EmptyFunctionConfig(/, **data: Any)#

Bases: FunctionBaseConfig

Base configuration for functions.

Attributes:
name: Optional display name for this function. Used in tracing and observability.

If not provided, the function type will be used.

middleware: List of function middleware names to apply to this function.

These must match names defined in the middleware section of the YAML configuration.

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 allow self as a field name.

FunctionConfigT#
FunctionGroupConfigT#