Skip to navigation

Subpackages

Submodules

Package Contents

Functions

NameDescription
actionDecorator to mark a function or class as an action.

API

nemoguardrails.actions.action(
is_system_action: bool = False,
name: typing.Optional[str] = None,
execute_async: bool = False
) -> typing.Callable[[T], nemoguardrails.actions.actions.T]

Decorator to mark a function or class as an action.

Parameters:

is_system_action
boolDefaults to False

Flag indicating if the action is a system action.

name
strDefaults to None

The name to associate with the action.

execute_async
boolDefaults to False

Whether the function should be executed in async mode.

Returns: Callable[[ T ], T ]

The decorated function or class.