Small fix to the prompt-format error message

This commit is contained in:
Ashwin Bharambe 2024-09-25 10:56:13 -07:00
parent a227edb480
commit d82a9d94e3

View file

@ -56,14 +56,14 @@ class ModelPromptFormat(Subcommand):
try: try:
model_id = CoreModelId(args.model_name) model_id = CoreModelId(args.model_name)
except ValueError: except ValueError:
raise argparse.ArgumentTypeError( self.parser.error(
f"{args.model_name} is not a valid Model. Choose one from --\n{model_str}" f"{args.model_name} is not a valid Model. Choose one from --\n{model_str}"
) from None )
if model_id not in supported_model_ids: if model_id not in supported_model_ids:
raise argparse.ArgumentTypeError( self.parser.error(
f"{model_id} is not a valid Model. Choose one from --\n {model_str}" f"{model_id} is not a valid Model. Choose one from --\n {model_str}"
) from None )
llama_3_1_file = pkg_resources.resource_filename( llama_3_1_file = pkg_resources.resource_filename(
"llama_models", "llama3_1/prompt_format.md" "llama_models", "llama3_1/prompt_format.md"