From b59e41c0a7c9097d8010c8c9536fd70d5d33520d Mon Sep 17 00:00:00 2001 From: aleksandarmijat Date: Fri, 5 Jul 2024 14:33:12 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Add=20=E2=80=94actions-module=20argument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rasa_sdk/__main__.py | 4 ++-- rasa_sdk/cli/arguments.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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, From 030492f86354a2255b907a938729d3f8eadf78ee Mon Sep 17 00:00:00 2001 From: aleksandarmijat Date: Fri, 5 Jul 2024 14:36:32 +0200 Subject: [PATCH 2/2] Add changelog. --- changelog/1122.improvement.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1122.improvement.md 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