Skip to content

Commit

Permalink
Add critical instructions for file names
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rminchev1 committed Oct 18, 2023
1 parent e6848ac commit c653f27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gpt_engineer/preprompts/improve
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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!

Expand Down

0 comments on commit c653f27

Please sign in to comment.