Added example messages to wholefile edit format

This commit is contained in:
Paul Gauthier 2024-05-01 09:34:40 -07:00
parent 0fb08896e3
commit 1403d19aa7
2 changed files with 29 additions and 2 deletions

View file

@ -8,3 +8,5 @@ class CoderPrompts:
files_content_local_edits = "I edited the files myself."
lazy_prompt = ""
example_messages = []

View file

@ -14,18 +14,43 @@ Once you understand the request you MUST:
3. If changes are needed, output a copy of each file that needs changes.
"""
example_messages = [
dict(
role="user",
content="Change the greeting to be more casual",
),
dict(
role="assistant",
content="""Ok, I will:
1. Switch the greeting text from "Hello" to "Hey".
show_greeting.py
{fence[0]}
import sys
def greeting(name):
print(f"Hey {name}")
if __name__ == '__main__':
greeting(sys.argv[1])
{fence[1]}
""",
),
]
system_reminder = """To suggest changes to a file you MUST return the entire content of the updated file.
You MUST use this *file listing* format:
path/to/filename.js
{fence[0]}javascript
{fence[0]}
// entire file content ...
// ... goes in between
{fence[1]}
Every *file listing* MUST use this format:
- First line: the filename with any originally provided path
- Second line: opening {fence[0]} including the code language
- Second line: opening {fence[0]}
- ... entire content of the file ...
- Final line: closing {fence[1]}