diff --git a/changelog/1122.improvement.md b/changelog/1122.improvement.md new file mode 100644 index 000000000..6d55ba71b --- /dev/null +++ b/changelog/1122.improvement.md @@ -0,0 +1 @@ +Added `--actions-module` argument for specifying the custom actions path, prioritizing it over the soon-to-be-deprecated `--actions` argument. \ No newline at end of file diff --git a/rasa_sdk/__main__.py b/rasa_sdk/__main__.py index 7cbfd6a2b..ab5ffc243 100644 --- a/rasa_sdk/__main__.py +++ b/rasa_sdk/__main__.py @@ -25,7 +25,7 @@ def main_from_args(args): if args.grpc: asyncio.run( run_grpc( - args.actions, + args.actions_module or args.actions, args.port, args.ssl_certificate, args.ssl_keyfile, @@ -36,7 +36,7 @@ def main_from_args(args): ) else: run( - args.actions, + args.actions_module or args.actions, args.port, args.cors, args.ssl_certificate, diff --git a/rasa_sdk/cli/arguments.py b/rasa_sdk/cli/arguments.py index 90e282e2c..31432cf84 100644 --- a/rasa_sdk/cli/arguments.py +++ b/rasa_sdk/cli/arguments.py @@ -47,6 +47,12 @@ def add_endpoint_arguments(parser: argparse.ArgumentParser) -> None: default=None, help="name of action package to be loaded", ) + parser.add_argument( + "--actions-module", + type=action_arg, + default=None, + help="name of action package to be loaded", + ) parser.add_argument( "--ssl-keyfile", default=None,