From 6bcd826b32026298d58b00eaf1553884cc1a25cd Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Sun, 21 Jul 2024 12:54:38 -0700 Subject: [PATCH] enable import of subcommands from llama-agentic-system --- toolchain/cli/llama.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/toolchain/cli/llama.py b/toolchain/cli/llama.py index 860451cff..65363d659 100644 --- a/toolchain/cli/llama.py +++ b/toolchain/cli/llama.py @@ -23,6 +23,17 @@ class LlamaCLIParser: Download.create(subparsers) InferenceParser.create(subparsers) + # Import sub-commands from agentic_system if they exist + try: + from agentic_system.cli.subcommand_modules import ( + SUBCOMMAND_MODULES, + ) + for module in SUBCOMMAND_MODULES: + module.create(subparsers) + + except ImportError: + pass + def parse_args(self) -> argparse.Namespace: return self.parser.parse_args()