mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
accept lists even when we asked for strings
This commit is contained in:
parent
1571f34fa3
commit
995fdc3415
1 changed files with 3 additions and 1 deletions
|
@ -121,8 +121,10 @@ class EditBlockFunctionCoder(Coder):
|
|||
original = get_arg(edit, "original_lines")
|
||||
updated = get_arg(edit, "updated_lines")
|
||||
|
||||
if self.code_format == "list":
|
||||
# gpt-3.5 returns lists even when instructed to return a string!
|
||||
if self.code_format == "list" or type(original) == list:
|
||||
original = "\n".join(original)
|
||||
if self.code_format == "list" or type(updated) == list:
|
||||
updated = "\n".join(updated)
|
||||
|
||||
if original and not original.endswith("\n"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue