Skip to content

Commit

Permalink
Fix prompt regression
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Jan 24, 2024
1 parent 882d4f3 commit 4f90255
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cwhy/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,17 @@ def format_file_locations(filename: str, lines: dict[int, str]) -> str:
group.append(line_content)
last = line_number
else:
result += f"File `{filename}`:\n"
result += f"File `{filename}`:\n```\n"
result += llm_utils.number_group_of_lines(
group, last - len(group) + 1
)
result += "\n```\n\n"
last = None
group = []
if last is not None:
result += f"File `{filename}`:\n"
result += f"File `{filename}`:\n```\n"
result += llm_utils.number_group_of_lines(group, last - len(group) + 1)
result += "\n```\n\n"
return result

formatted_file_locations = [
Expand Down

0 comments on commit 4f90255

Please sign in to comment.