made main args accessible
@@ -9,17 +9,21 @@ from rasa_sdk import utils
from rasa_sdk.endpoint import create_argument_parser, run
+def main_from_args(args):
+ logging.basicConfig(level=logging.DEBUG)
+ logging.getLogger("matplotlib").setLevel(logging.WARN)
+
+ utils.configure_colored_logging(args.loglevel)
+
+ run(args.actions, args.port, args.cors)
+
+
def main():
# Running as standalone python application
arg_parser = create_argument_parser()
cmdline_args = arg_parser.parse_args()
- logging.basicConfig(level=logging.DEBUG)
- logging.getLogger("matplotlib").setLevel(logging.WARN)
-
- utils.configure_colored_logging(cmdline_args.loglevel)
-
- run(cmdline_args.actions, cmdline_args.port, cmdline_args.cors)
+ main_from_args(cmdline_args)
if __name__ == "__main__":
