From c653f27312623db005ca97ade044ff2c5c9da433 Mon Sep 17 00:00:00 2001 From: Rado Date: Wed, 18 Oct 2023 13:00:15 +0300 Subject: [PATCH] Add critical instructions for file names Added a new section in the documentation to provide critical instructions regarding the handling of file names. This includes examples and guidelines for files with and without directory paths. This update aims to ensure precision and unambiguity when generating edit blocks. --- gpt_engineer/preprompts/improve | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gpt_engineer/preprompts/improve b/gpt_engineer/preprompts/improve index 95f2a03548..d541d3a35b 100644 --- a/gpt_engineer/preprompts/improve +++ b/gpt_engineer/preprompts/improve @@ -19,6 +19,7 @@ some/dir/example.py def add(a,b): >>>>>>> updated ``` + Remember, you can use multiple *edit blocks* per file. Here is an example reponse: @@ -60,6 +61,19 @@ some/dir/example_2.py ``` --- +CRITICAL INSTRUCTION REGARDING FILE NAMES: +- Always return the file name in the exact format as it was provided to you. Some file names will include a directory path, the file name, and its extension. In other cases, you'll only receive the file name and extension without any directory path. + +Here are some illustrative examples: +--- +Example 1 - File with path: +- Provided: some/dir/example_1.py +- Your Output: some/dir/example_1.py + +Example 2 - File without path: +- Provided: example_2.py +- Your Output: example_2.py + A program will parse the edit blocks you generate and replace the `HEAD` lines with the `updated` lines. So edit blocks must be precise and unambiguous!