From e08afcc3b75ad88732f97e768f29452321064458 Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Tue, 19 Nov 2024 22:02:53 -0800 Subject: [PATCH 1/3] add missing deps --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4c3c2a1..3f467c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,12 @@ dependencies = [ "distro>=1.7.0, <2", "sniffio", "cached-property; python_version < '3.8'", + "tqdm", + "rich", + "click", + "pyaml", + "prompt_toolkit", + "pandas" ] requires-python = ">= 3.7" classifiers = [ From 9d34b6a6ad76ad46409bb3b974cc623ac2c9908a Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Tue, 19 Nov 2024 22:19:13 -0800 Subject: [PATCH 2/3] fix cli error --- src/llama_stack_client/lib/cli/llama_stack_client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/llama_stack_client/lib/cli/llama_stack_client.py b/src/llama_stack_client/lib/cli/llama_stack_client.py index 38bc33e..1cd4338 100644 --- a/src/llama_stack_client/lib/cli/llama_stack_client.py +++ b/src/llama_stack_client/lib/cli/llama_stack_client.py @@ -34,14 +34,12 @@ def cli(ctx, endpoint: str, config: str | None): ctx.ensure_object(dict) # If no config provided, check default location - if config is None: + if config: if endpoint != "": raise ValueError("Cannot use both config and endpoint") default_config = get_config_file_path() if default_config.exists(): config = str(default_config) - - if config: try: with open(config, "r") as f: config_dict = yaml.safe_load(f) From a22babc7897c0b562b28f8f5e25adfa077e869ef Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Tue, 19 Nov 2024 22:26:43 -0800 Subject: [PATCH 3/3] fix validation for endpoint --- src/llama_stack_client/lib/cli/llama_stack_client.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/llama_stack_client/lib/cli/llama_stack_client.py b/src/llama_stack_client/lib/cli/llama_stack_client.py index 1cd4338..6d4f50f 100644 --- a/src/llama_stack_client/lib/cli/llama_stack_client.py +++ b/src/llama_stack_client/lib/cli/llama_stack_client.py @@ -34,12 +34,15 @@ def cli(ctx, endpoint: str, config: str | None): ctx.ensure_object(dict) # If no config provided, check default location - if config: - if endpoint != "": - raise ValueError("Cannot use both config and endpoint") + if config and endpoint: + raise ValueError("Cannot use both config and endpoint") + + if config is None: default_config = get_config_file_path() if default_config.exists(): config = str(default_config) + + if config: try: with open(config, "r") as f: config_dict = yaml.safe_load(f)