Add api build subcommand -- WIP

This commit is contained in:
Ashwin Bharambe 2024-08-26 19:19:37 -07:00 committed by Ashwin Bharambe
parent f5620c09ad
commit 3a337c5f1c
7 changed files with 203 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
import argparse
from llama_toolchain.cli.subcommand import Subcommand
from .build import ApiBuild
class ApiParser(Subcommand):
def __init__(self, subparsers: argparse._SubParsersAction):
super().__init__()
self.parser = subparsers.add_parser(
"api",
prog="llama api",
description="Operate on llama stack API providers",
)
subparsers = self.parser.add_subparsers(title="api_subcommands")
# Add sub-commands
ApiBuild.create(subparsers)