Skip to content

Commit

Permalink
Change README.md to LAST_MODIFICATION_README.md
Browse files Browse the repository at this point in the history
The file name "README.md" has been changed to "LAST_MODIFICATION_README.md" in the parse_chat and overwrite_files functions. This change is reflected in the appending of the file name to the files list and the conditional check in the overwrite_files function. This is to ensure that the last modification readme file is correctly identified and updated. Also to allow to ask the LLM to update the README.md, if any in the project
  • Loading branch information
rminchev1 committed Oct 12, 2023
1 parent 1abdd36 commit a2a5143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt_engineer/chat_to_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def parse_chat(chat) -> List[Tuple[str, str]]:

# Get all the text before the first ``` block
readme = chat.split("```")[0]
files.append(("README.md", readme))
files.append(("LAST_MODIFICATION_README.md", readme))

# Return the files
return files
Expand Down Expand Up @@ -106,7 +106,7 @@ def overwrite_files(chat, dbs):

files = parse_chat(chat)
for file_name, file_content in files:
if file_name == "README.md":
if file_name == "LAST_MODIFICATION_README.md":
dbs.project_metadata["LAST_MODIFICATION_README.md"] = file_content
else:
dbs.workspace[file_name] = file_content
Expand Down

0 comments on commit a2a5143

Please sign in to comment.