mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 02:58:21 +00:00
List providers command prints out non-existing APIs from registry. Fixes #966
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
529708215c
commit
35bc05d71b
2 changed files with 16 additions and 2 deletions
|
@ -9,6 +9,20 @@ from enum import Enum
|
|||
from llama_models.schema_utils import json_schema_type
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class RegisteredApi(Enum):
|
||||
agents = "agents"
|
||||
datasetio = "datasetio"
|
||||
eval = "eval"
|
||||
inference = "inference"
|
||||
post_training = "post_training"
|
||||
safety = "safety"
|
||||
scoring = "scoring"
|
||||
telemetry = "telemetry"
|
||||
tool_runtime = "tool_runtime"
|
||||
vector_io = "vector_io"
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class Api(Enum):
|
||||
inference = "inference"
|
||||
|
|
|
@ -22,9 +22,9 @@ class StackListProviders(Subcommand):
|
|||
self.parser.set_defaults(func=self._run_providers_list_cmd)
|
||||
|
||||
def _add_arguments(self):
|
||||
from llama_stack.distribution.datatypes import Api
|
||||
from llama_stack.apis.datatypes import RegisteredApi
|
||||
|
||||
api_values = [a.value for a in Api]
|
||||
api_values = [a.value for a in RegisteredApi]
|
||||
self.parser.add_argument(
|
||||
"api",
|
||||
type=str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue