mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
llama_toolchain/distribution -> llama_toolchain/core
This commit is contained in:
parent
81540e6ce8
commit
3cb67f1f58
31 changed files with 49 additions and 45 deletions
|
@ -8,13 +8,13 @@ import argparse
|
|||
from typing import Dict
|
||||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.distribution.datatypes import * # noqa: F403
|
||||
from llama_toolchain.core.datatypes import * # noqa: F403
|
||||
|
||||
|
||||
def parse_dependencies(
|
||||
dependencies: str, parser: argparse.ArgumentParser
|
||||
) -> Dict[str, ProviderSpec]:
|
||||
from llama_toolchain.distribution.distribution import api_providers
|
||||
from llama_toolchain.core.distribution import api_providers
|
||||
|
||||
all_providers = api_providers()
|
||||
|
||||
|
@ -48,8 +48,8 @@ class ApiBuild(Subcommand):
|
|||
self.parser.set_defaults(func=self._run_api_build_command)
|
||||
|
||||
def _add_arguments(self):
|
||||
from llama_toolchain.distribution.distribution import stack_apis
|
||||
from llama_toolchain.distribution.package import (
|
||||
from llama_toolchain.core.distribution import stack_apis
|
||||
from llama_toolchain.core.package import (
|
||||
BuildType,
|
||||
)
|
||||
|
||||
|
@ -86,7 +86,7 @@ class ApiBuild(Subcommand):
|
|||
)
|
||||
|
||||
def _run_api_build_command(self, args: argparse.Namespace) -> None:
|
||||
from llama_toolchain.distribution.package import (
|
||||
from llama_toolchain.core.package import (
|
||||
ApiInput,
|
||||
BuildType,
|
||||
build_package,
|
||||
|
|
|
@ -13,7 +13,7 @@ import yaml
|
|||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.common.config_dirs import BUILDS_BASE_DIR
|
||||
from llama_toolchain.distribution.datatypes import * # noqa: F403
|
||||
from llama_toolchain.core.datatypes import * # noqa: F403
|
||||
|
||||
|
||||
class ApiConfigure(Subcommand):
|
||||
|
@ -31,8 +31,8 @@ class ApiConfigure(Subcommand):
|
|||
self.parser.set_defaults(func=self._run_api_configure_cmd)
|
||||
|
||||
def _add_arguments(self):
|
||||
from llama_toolchain.distribution.distribution import stack_apis
|
||||
from llama_toolchain.distribution.package import BuildType
|
||||
from llama_toolchain.core.distribution import stack_apis
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
||||
allowed_args = [a.name for a in stack_apis()]
|
||||
self.parser.add_argument(
|
||||
|
@ -67,7 +67,7 @@ class ApiConfigure(Subcommand):
|
|||
)
|
||||
|
||||
def _run_api_configure_cmd(self, args: argparse.Namespace) -> None:
|
||||
from llama_toolchain.distribution.package import BuildType
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
||||
if args.build_name:
|
||||
name = args.build_name
|
||||
|
@ -89,7 +89,7 @@ class ApiConfigure(Subcommand):
|
|||
|
||||
def configure_llama_provider(config_file: Path) -> None:
|
||||
from llama_toolchain.common.serialize import EnumEncoder
|
||||
from llama_toolchain.distribution.configure import configure_api_providers
|
||||
from llama_toolchain.core.configure import configure_api_providers
|
||||
|
||||
with open(config_file, "r") as f:
|
||||
config = PackageConfig(**yaml.safe_load(f))
|
||||
|
|
|
@ -12,7 +12,7 @@ import pkg_resources
|
|||
import yaml
|
||||
|
||||
from llama_toolchain.cli.subcommand import Subcommand
|
||||
from llama_toolchain.distribution.datatypes import * # noqa: F403
|
||||
from llama_toolchain.core.datatypes import * # noqa: F403
|
||||
|
||||
|
||||
class ApiStart(Subcommand):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue