mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
add llama model subcommand
This commit is contained in:
parent
4417407652
commit
f0e0903270
5 changed files with 77 additions and 0 deletions
29
llama_toolchain/cli/model/model.py
Normal file
29
llama_toolchain/cli/model/model.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import argparse
|
||||
import textwrap
|
||||
|
||||
from llama_toolchain.cli.model.template import ModelTemplate
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
|
||||
|
||||
class ModelParser(Subcommand):
|
||||
"""Llama cli for model interface apis"""
|
||||
|
||||
def __init__(self, subparsers: argparse._SubParsersAction):
|
||||
super().__init__()
|
||||
self.parser = subparsers.add_parser(
|
||||
"model",
|
||||
prog="llama model",
|
||||
description="Describe llama model interfaces",
|
||||
epilog=textwrap.dedent(
|
||||
"""
|
||||
Example:
|
||||
llama model <subcommand> <options>
|
||||
"""
|
||||
),
|
||||
)
|
||||
|
||||
subparsers = self.parser.add_subparsers(title="model_subcommands")
|
||||
|
||||
# Add sub-commandsa
|
||||
# ModelDescribe.create(subparsers)
|
||||
ModelTemplate.create(subparsers)
|
Loading…
Add table
Add a link
Reference in a new issue