Skip to content

Commit 83ba37b

Browse files
authored
Merge pull request #2270 from tisnik/lcore-3141-limit-possible-cli-values
LCORE-3141: Limit possible values on CLI
2 parents b4d981a + 2e41382 commit 83ba37b

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ options:
860860
dump actual configuration into JSON file and quit
861861
-s, --dump-schema dump configuration schema into OpenAPI-compatible file and quit
862862
-m, --dump-models dump schemas for all models into OpenAPI-compatible file and quit
863-
-gr, --dump-models-group DUMP_MODELS_GROUP
863+
-gr, --dump-models-group {requests,successful_responses,error_responses,common,agents,common_responses}
864864
dump schemas for selected models group into OpenAPI-compatible file and quit
865865
-c, --config CONFIG_FILE
866866
path to configuration file (default: lightspeed-stack.yaml)

src/lightspeed_stack.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def create_argument_parser() -> ArgumentParser:
2828
- -d / --dump-configuration: dump the loaded configuration to JSON and exit
2929
- -s / --dump-schema: dump the configuration schema to OpenAPI JSON and exit
3030
- -m / --dump-models: dump schemas for all models into OpenAPI-compatible file and quit
31-
- -gr / --dump-models-group DUMP_MODELS_GROUP
32-
dump schemas for selected models group into OpenAPI-compatible file and quit
31+
- -gr / --dump-models-group {requests,successful_responses,error_responses,common,agents,
32+
common_responses}
33+
dump schemas for selected models group into OpenAPI-compatible file and quit
3334
- -c / --config: path to the configuration file (default "lightspeed-stack.yaml")
3435
- -g / --generate-llama-stack-configuration: generate a Llama Stack
3536
configuration from the service configuration
@@ -78,6 +79,14 @@ def create_argument_parser() -> ArgumentParser:
7879
dest="dump_models_group",
7980
help="dump schemas for selected models group into OpenAPI-compatible file and quit",
8081
action="store",
82+
choices=[
83+
"requests",
84+
"successful_responses",
85+
"error_responses",
86+
"common",
87+
"agents",
88+
"common_responses",
89+
],
8190
default=None,
8291
)
8392
parser.add_argument(

0 commit comments

Comments
 (0)