Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3920,12 +3920,12 @@ def load_template(name: str) -> Template:
raise LoadTemplateError("Could not load template {}: {}".format(name, ex))

# Try local file
if potential_path.exists():
if potential_path.is_file():
path = potential_path
else:
# Look for template in template_dir()
path = template_dir() / f"{name}.yaml"
if not path.exists():
if not path.is_file():
raise LoadTemplateError(f"Invalid template: {name}")
content = path.read_text()
template_obj = _parse_yaml_template(name, content)
Expand Down