refac and func update_files

This commit is contained in:
Paul Gauthier 2023-06-21 21:17:12 -07:00
parent 8c1e1c7267
commit eb062cc504
4 changed files with 35 additions and 10 deletions

View file

@ -16,7 +16,9 @@ class EditBlockCoder(Coder):
def update_cur_messages(self, content, edited):
self.cur_messages += [dict(role="assistant", content=content)]
def update_files(self, content):
def update_files(self):
content = self.partial_response_content
# might raise ValueError for malformed ORIG/UPD blocks
edits = list(find_original_update_blocks(content))