use a word for 3,4,5 backticks

This commit is contained in:
Paul Gauthier 2023-06-25 17:00:59 -07:00
parent f005404ec0
commit 59d99835b1
2 changed files with 11 additions and 4 deletions

View file

@ -366,8 +366,15 @@ You *MUST* use {num_ticks} backticks, because some files contain {num_ticks-1} b
fence = "`" * num_ticks
number_mapping = {
3: "triple",
4: "quadruple",
5: "quintuple",
}
num_ticks_name = number_mapping.get(num_ticks, str(num_ticks))
prompt = prompt.format(
num_ticks=num_ticks,
num_ticks=num_ticks_name,
fence=fence,
num_ticks_explanation=explain,
)

View file

@ -19,17 +19,17 @@ Once you understand the request you MUST:
path/to/filename.js
{fence}javascript
// entire file content goes in the
// triple backticked fenced block
// {num_ticks} backtick fenced block
{fence}
Every *file listing* MUST use this format:
- First line: the filename with any required path!
- First line: the filename with any originally provided path
- Second line: opening {num_ticks} backtick fence with the correct code language.
- Final line: closing {num_ticks} backtick fence.
{num_ticks_explanation}
To suggest changes to a file you MUST return a *file listing* that contains the entire content of the file.
Create a new file you MUST return a *file listing* which includes an appropriate filename, including any required path.
Create a new file you MUST return a *file listing* which includes an appropriate filename, including any appropriate path.
"""
files_content_prefix = "Here is the current content of the files:\n"