mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 07:39:38 +00:00
more clean up on build
This commit is contained in:
parent
1855fd2835
commit
1fec9930aa
1 changed files with 0 additions and 24 deletions
|
@ -11,30 +11,6 @@ from llama_toolchain.core.datatypes import * # noqa: F403
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
def parse_api_provider_tuples(
|
|
||||||
tuples: str, parser: argparse.ArgumentParser
|
|
||||||
) -> Dict[str, ProviderSpec]:
|
|
||||||
from llama_toolchain.core.distribution import api_providers
|
|
||||||
|
|
||||||
all_providers = api_providers()
|
|
||||||
|
|
||||||
deps = {}
|
|
||||||
for dep in tuples.split(","):
|
|
||||||
dep = dep.strip()
|
|
||||||
if not dep:
|
|
||||||
continue
|
|
||||||
api_str, provider = dep.split("=")
|
|
||||||
api = Api(api_str)
|
|
||||||
|
|
||||||
provider = provider.strip()
|
|
||||||
if provider not in all_providers[api]:
|
|
||||||
parser.error(f"Provider `{provider}` is not available for API `{api}`")
|
|
||||||
return
|
|
||||||
deps[api] = all_providers[api][provider]
|
|
||||||
|
|
||||||
return deps
|
|
||||||
|
|
||||||
|
|
||||||
class StackBuild(Subcommand):
|
class StackBuild(Subcommand):
|
||||||
def __init__(self, subparsers: argparse._SubParsersAction):
|
def __init__(self, subparsers: argparse._SubParsersAction):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue