Skip to content

Commit

Permalink
Merge pull request #1122 from RasaHQ/add-actions-module-argument
Browse files Browse the repository at this point in the history
Add —actions-module argument
  • Loading branch information
aleksandarmijat authored Jul 10, 2024
2 parents 66bb132 + 030492f commit 1f3fe9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/1122.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `--actions-module` argument for specifying the custom actions path, prioritizing it over the soon-to-be-deprecated `--actions` argument.
4 changes: 2 additions & 2 deletions rasa_sdk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions rasa_sdk/cli/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1f3fe9d

Please sign in to comment.