mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Refactoring distribution/distribution.py
This file was becoming too large and unclear what it housed. Split it into pieces.
This commit is contained in:
parent
546f05bd3f
commit
df68db644b
9 changed files with 89 additions and 78 deletions
|
@ -175,7 +175,7 @@ class StackBuild(Subcommand):
|
|||
import yaml
|
||||
from llama_stack.distribution.distribution import (
|
||||
Api,
|
||||
api_providers,
|
||||
get_provider_registry,
|
||||
builtin_automatically_routed_apis,
|
||||
)
|
||||
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
||||
|
@ -245,7 +245,7 @@ class StackBuild(Subcommand):
|
|||
)
|
||||
|
||||
providers = dict()
|
||||
all_providers = api_providers()
|
||||
all_providers = get_provider_registry()
|
||||
routing_table_apis = set(
|
||||
x.routing_table_api for x in builtin_automatically_routed_apis()
|
||||
)
|
||||
|
|
|
@ -34,9 +34,9 @@ class StackListProviders(Subcommand):
|
|||
|
||||
def _run_providers_list_cmd(self, args: argparse.Namespace) -> None:
|
||||
from llama_stack.cli.table import print_table
|
||||
from llama_stack.distribution.distribution import Api, api_providers
|
||||
from llama_stack.distribution.distribution import Api, get_provider_registry
|
||||
|
||||
all_providers = api_providers()
|
||||
all_providers = get_provider_registry()
|
||||
providers_for_api = all_providers[Api(args.api)]
|
||||
|
||||
# eventually, this should query a registry at llama.meta.com/llamastack/distributions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue