mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 20:14:13 +00:00
[api_updates_3] fix CLI for routing_table, bug fixes for memory & safety (#90)
* fix llama stack build * fix configure * fix configure for simple case * configure w/ routing * move examples config * fix memory router naming * issue w/ safety * fix config w/ safety * update memory endpoints * allow providers in api_providers * configure script works * all endpoints w/ build->configure->run simple local works * new example run.yaml * run openapi generator
This commit is contained in:
parent
8cf634e615
commit
ddebf9b6e7
18 changed files with 725 additions and 605 deletions
|
@ -160,7 +160,11 @@ class StackBuild(Subcommand):
|
|||
|
||||
def _run_stack_build_command(self, args: argparse.Namespace) -> None:
|
||||
import yaml
|
||||
from llama_stack.distribution.distribution import Api, api_providers
|
||||
from llama_stack.distribution.distribution import (
|
||||
Api,
|
||||
api_providers,
|
||||
builtin_automatically_routed_apis,
|
||||
)
|
||||
from llama_stack.distribution.utils.dynamic import instantiate_class_type
|
||||
from prompt_toolkit import prompt
|
||||
from prompt_toolkit.validation import Validator
|
||||
|
@ -213,8 +217,15 @@ class StackBuild(Subcommand):
|
|||
)
|
||||
|
||||
providers = dict()
|
||||
all_providers = api_providers()
|
||||
routing_table_apis = set(
|
||||
x.routing_table_api for x in builtin_automatically_routed_apis()
|
||||
)
|
||||
|
||||
for api in Api:
|
||||
all_providers = api_providers()
|
||||
if api in routing_table_apis:
|
||||
continue
|
||||
|
||||
providers_for_api = all_providers[api]
|
||||
|
||||
api_provider = prompt(
|
||||
|
|
|
@ -145,7 +145,7 @@ class StackConfigure(Subcommand):
|
|||
built_at=datetime.now(),
|
||||
image_name=image_name,
|
||||
apis_to_serve=[],
|
||||
provider_map={},
|
||||
api_providers={},
|
||||
)
|
||||
|
||||
config = configure_api_providers(config, build_config.distribution_spec)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue