Skip to content

Commit

Permalink
Fix: Prevent TypeError in llm templates list for templates with emp…
Browse files Browse the repository at this point in the history
…ty prompts (#132)
  • Loading branch information
sherwind authored Jul 26, 2023
1 parent 65d1666 commit 531d188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def templates_list():
if template.prompt:
text.append(f" prompt: {template.prompt}")
else:
text = [template.prompt]
text = [template.prompt if template.prompt else ""]
pairs.append((name, "".join(text).replace("\n", " ")))
try:
max_name_len = max(len(p[0]) for p in pairs)
Expand Down

0 comments on commit 531d188

Please sign in to comment.