mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 22:32:27 +00:00
# What does this PR do? ## Test Plan # What does this PR do? ## Test Plan # What does this PR do? ## Test Plan
31 lines
929 B
Python
31 lines
929 B
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
import argparse
|
|
|
|
|
|
def add_config_template_args(parser: argparse.ArgumentParser):
|
|
"""Add unified config/template arguments with backward compatibility."""
|
|
group = parser.add_mutually_exclusive_group(required=True)
|
|
|
|
group.add_argument(
|
|
"config",
|
|
nargs="?",
|
|
help="Configuration file path or template name",
|
|
)
|
|
|
|
# Backward compatibility arguments (deprecated)
|
|
group.add_argument(
|
|
"--config",
|
|
dest="config",
|
|
help="(DEPRECATED) Use positional argument [config] instead. Configuration file path",
|
|
)
|
|
|
|
group.add_argument(
|
|
"--template",
|
|
dest="config",
|
|
help="(DEPRECATED) Use positional argument [config] instead. Template name",
|
|
)
|