mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-12 17:21:01 +00:00
Better error on llm templates show, closes #1053
This commit is contained in:
parent
330a568683
commit
fd2f0ffbcd
1 changed files with 4 additions and 1 deletions
|
|
@ -2303,7 +2303,10 @@ def templates_list():
|
|||
@click.argument("name")
|
||||
def templates_show(name):
|
||||
"Show the specified prompt template"
|
||||
template = load_template(name)
|
||||
try:
|
||||
template = load_template(name)
|
||||
except LoadTemplateError:
|
||||
raise click.ClickException(f"Template '{name}' not found or invalid")
|
||||
click.echo(
|
||||
yaml.dump(
|
||||
dict((k, v) for k, v in template.model_dump().items() if v is not None),
|
||||
|
|
|
|||
Loading…
Reference in a new issue