mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
Add a system prompt to remind gpt about the output format
This commit is contained in:
parent
257b58ba86
commit
1313a3f36b
2 changed files with 3 additions and 5 deletions
2
coder.py
2
coder.py
|
@ -113,11 +113,11 @@ class Coder:
|
||||||
def get_files_messages(self):
|
def get_files_messages(self):
|
||||||
files_content = prompts.files_content_prefix
|
files_content = prompts.files_content_prefix
|
||||||
files_content += self.get_files_content()
|
files_content += self.get_files_content()
|
||||||
files_content += prompts.files_content_suffix
|
|
||||||
|
|
||||||
files_messages = [
|
files_messages = [
|
||||||
dict(role="user", content=files_content),
|
dict(role="user", content=files_content),
|
||||||
dict(role="assistant", content="Ok."),
|
dict(role="assistant", content="Ok."),
|
||||||
|
dict(role="system", content=prompts.files_content_suffix),
|
||||||
]
|
]
|
||||||
|
|
||||||
return files_messages
|
return files_messages
|
||||||
|
|
|
@ -58,10 +58,8 @@ files_content_local_edits = "I made some changes to the files myself."
|
||||||
|
|
||||||
files_content_prefix = "Here is the current content of the files:\n\n"
|
files_content_prefix = "Here is the current content of the files:\n\n"
|
||||||
|
|
||||||
files_content_suffix = """
|
files_content_suffix = """BASE ANY EDITS ON THE CURRENT CONTENTS OF THE FILES AS SHOWN IN THE USER'S LAST MESSAGE.
|
||||||
|
NEVER REPLY WITH AN ENTIRE FILE IN THE TRIPLE-QUOTED FORMAT LIKE THAT!
|
||||||
BASE ANY EDITS ON THE CURRENT CONTENTS OF THE FILES AS SHOWN IN THIS MESSAGE.
|
|
||||||
NEVER REPLY WITH AN ENTIRE FILE IN THE TRIPLE-QUOTED FORMAT LIKE THIS!
|
|
||||||
ANY CODE YOU INCLUDE IN A REPLY MUST BE IN THE ORIGINAL/UPDATED FORMAT!
|
ANY CODE YOU INCLUDE IN A REPLY MUST BE IN THE ORIGINAL/UPDATED FORMAT!
|
||||||
THE ORIGINAL BLOCK MUST BE THE *EXACT* LINES FROM THE FILE!
|
THE ORIGINAL BLOCK MUST BE THE *EXACT* LINES FROM THE FILE!
|
||||||
INCLUDE ALL THE LEADING SPACES!!
|
INCLUDE ALL THE LEADING SPACES!!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue