mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
Distribution server now functioning
This commit is contained in:
parent
041cafbee3
commit
2cf9915806
21 changed files with 635 additions and 266 deletions
|
@ -7,6 +7,7 @@
|
|||
import argparse
|
||||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.distribution.registry import resolve_distribution
|
||||
|
||||
|
||||
class DistributionCreate(Subcommand):
|
||||
|
@ -23,7 +24,20 @@ class DistributionCreate(Subcommand):
|
|||
self.parser.set_defaults(func=self._run_distribution_create_cmd)
|
||||
|
||||
def _add_arguments(self):
|
||||
pass
|
||||
self.parser.add_argument(
|
||||
"--name",
|
||||
type=str,
|
||||
help="Name of the distribution to create",
|
||||
required=True,
|
||||
)
|
||||
# for each ApiSurface the user wants to support, we should
|
||||
# get the list of available adapters, ask which one the user
|
||||
# wants to pick and then ask for their configuration.
|
||||
|
||||
def _run_distribution_create_cmd(self, args: argparse.Namespace) -> None:
|
||||
dist = resolve_distribution(args.name)
|
||||
if dist is not None:
|
||||
self.parser.error(f"Distribution with name {args.name} already exists")
|
||||
return
|
||||
|
||||
raise NotImplementedError()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue