nat.tool.datetime_tools#
Classes#
Simple tool which returns the current date and time in human readable format with timezone information. By default, |
Functions#
|
|
|
Module Contents#
- class CurrentTimeToolConfig(/, **data: Any)#
Bases:
nat.data_models.function.FunctionBaseConfigSimple tool which returns the current date and time in human readable format with timezone information. By default, the timezone is in Etc/UTC. If the user provides a timezone in the header, we will use it. Timezone will be provided in IANA zone name format. For example, “America/New_York” or “Etc/UTC”.
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.selfis explicitly positional-only to allowselfas a field name.
- _get_timezone_obj(
- headers: starlette.datastructures.Headers | None,
- async current_datetime(
- _config: CurrentTimeToolConfig,
- _builder: nat.builder.builder.Builder,