| 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 | # All rights reserved. |
| 3 | # |
| 4 | # This source code is licensed under the terms described in the LICENSE file in |
| 5 | # the root directory of this source tree. |
| 6 | |
| 7 | import argparse |
| 8 | |
| 9 | from llama_stack.cli.subcommand import Subcommand |
| 10 | |
| 11 | |
| 12 | class ModelDownload(Subcommand): |
| 13 | def __init__(self, subparsers: argparse._SubParsersAction): |
| 14 | super().__init__() |
| 15 | self.parser = subparsers.add_parser( |
| 16 | "download", |
| 17 | prog="llama model download", |
| 18 | description="Download a model from llama.meta.com or Hugging Face Hub", |
| 19 | formatter_class=argparse.RawTextHelpFormatter, |
| 20 | ) |
| 21 | |
| 22 | from llama_stack.cli.download import setup_download_parser |
| 23 | |
| 24 | setup_download_parser(self.parser) |