File tree Expand file tree Collapse file tree 17 files changed +43
-29
lines changed
src/llama_stack_client/lib Expand file tree Collapse file tree 17 files changed +43
-29
lines changed Original file line number Diff line number Diff line change @@ -123,4 +123,4 @@ $ llama-stack-client shields list
123123+==============+==========+================+=============+
124124| llama_guard | {} | meta-reference | llama_guard |
125125+--------------+----------+----------------+-------------+
126- ```
126+ ```
Original file line number Diff line number Diff line change 11File generated from our OpenAPI spec by Stainless.
22
33This directory can be used to store custom files to expand the SDK.
4- It is ignored by Stainless code generation and its content (other than this keep file) won't be touched.
4+ It is ignored by Stainless code generation and its content (other than this keep file) won't be touched.
Original file line number Diff line number Diff line change 55# the root directory of this source tree.
66
77import os
8+
89import click
910import yaml
10- from llama_stack_client .lib .cli .constants import get_config_file_path , LLAMA_STACK_CLIENT_CONFIG_DIR
1111from prompt_toolkit import prompt
1212from prompt_toolkit .validation import Validator
1313
14+ from llama_stack_client .lib .cli .constants import get_config_file_path , LLAMA_STACK_CLIENT_CONFIG_DIR
15+
1416
1517def get_config ():
1618 config_file = get_config_file_path ()
Original file line number Diff line number Diff line change 44# This source code is licensed under the terms described in the LICENSE file in
55# the root directory of this source tree.
66
7+ import json
8+ from typing import Optional
9+
710import click
811import yaml
9- from typing import Optional
10- import json
1112
12- from llama_models .llama3 .api .datatypes import URL
1313from .list import list_datasets
1414
1515
@@ -41,14 +41,14 @@ def register(
4141
4242 try :
4343 dataset_schema = json .loads (schema )
44- except json .JSONDecodeError :
45- raise click .BadParameter ("Schema must be valid JSON" )
44+ except json .JSONDecodeError as err :
45+ raise click .BadParameter ("Schema must be valid JSON" ) from err
4646
4747 if metadata :
4848 try :
4949 metadata = json .loads (metadata )
50- except json .JSONDecodeError :
51- raise click .BadParameter ("Metadata must be valid JSON" )
50+ except json .JSONDecodeError as err :
51+ raise click .BadParameter ("Metadata must be valid JSON" ) from err
5252
5353 response = client .datasets .register (
5454 dataset_id = dataset_id ,
Original file line number Diff line number Diff line change 55# the root directory of this source tree.
66
77import click
8- from rich .table import Table
98from rich .console import Console
9+ from rich .table import Table
1010
1111
1212@click .command ("list" )
Original file line number Diff line number Diff line change 55# the root directory of this source tree.
66
77
8- import click
98import json
10- import yaml
119from typing import Optional
1210
11+ import click
12+ import yaml
13+
1314from .list import list_eval_tasks
1415
1516
@@ -42,8 +43,8 @@ def register(
4243 if metadata :
4344 try :
4445 metadata = json .loads (metadata )
45- except json .JSONDecodeError :
46- raise click .BadParameter ("Metadata must be valid JSON" )
46+ except json .JSONDecodeError as err :
47+ raise click .BadParameter ("Metadata must be valid JSON" ) from err
4748
4849 response = client .eval_tasks .register (
4950 eval_task_id = eval_task_id ,
Original file line number Diff line number Diff line change 55# the root directory of this source tree.
66
77import click
8- from rich .table import Table
98from rich .console import Console
9+ from rich .table import Table
1010
1111
1212@click .command ("list" )
Original file line number Diff line number Diff line change 66
77import click
88import yaml
9+
910from llama_stack_client import LlamaStackClient
11+ from .configure import configure
1012
1113from .constants import get_config_file_path
12- from .configure import configure
1314from .datasets import datasets
1415from .eval_tasks import eval_tasks
1516from .memory_banks import memory_banks
Original file line number Diff line number Diff line change 44# This source code is licensed under the terms described in the LICENSE file in
55# the root directory of this source tree.
66
7- import click
87from typing import Optional
8+
9+ import click
910import yaml
10- from rich .table import Table
1111from rich .console import Console
12+ from rich .table import Table
1213
1314
1415@click .group ()
Original file line number Diff line number Diff line change 55# the root directory of this source tree.
66
77from .models import models
8+
9+ __all__ = ["models" ]
You can’t perform that action at this time.
0 commit comments