mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
30 lines
869 B
Python
30 lines
869 B
Python
# 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
|
|
from .configure import ApiConfigure
|
|
from .start import ApiStart
|
|
|
|
|
|
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)
|
|
ApiConfigure.create(subparsers)
|
|
ApiStart.create(subparsers)
|