Merge remote-tracking branch 'upstream/main' into gpt4-vision

This commit is contained in:
Joshua Vial 2023-12-21 09:29:32 +13:00
commit 9e656945fe
8 changed files with 391 additions and 221 deletions

View file

@ -1 +1 @@
__version__ = "0.18.2-dev"
__version__ = "0.19.1-dev"

View file

@ -5,9 +5,11 @@ from .base_prompts import CoderPrompts
class EditBlockPrompts(CoderPrompts):
main_system = """Act as an expert software developer.
You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
Always use best practices when coding.
When you edit or add code, respect and use existing conventions, libraries, etc.
Always COMPLETELY IMPLEMENT the needed code.
Respect and use existing conventions, libraries, etc that are already present in the code base.
Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
@ -172,10 +174,16 @@ Include *ALL* the code being searched and replaced!
Only *SEARCH/REPLACE* files that are *read-write*.
To move code within a file, use 2 *SEARCH/REPLACE* blocks: 1 to delete it from its current location, 1 to insert it in the new location.
If you want to put code in a new file, use a *SEARCH/REPLACE block* with:
- A new file path, including dir name if needed
- An empty `SEARCH` section
- The new file's contents in the `REPLACE` section
You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
"""
files_content_prefix = "These are the *read-write* files:\n"

View file

@ -5,7 +5,9 @@ from .base_prompts import CoderPrompts
class UnifiedDiffPrompts(CoderPrompts):
main_system = """Act as an expert software developer.
You are diligent and tireless, and you always COMPLETELY IMPLEMENT the needed code.
You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
Always use best practices when coding.
Respect and use existing conventions, libraries, etc that are already present in the code base.
@ -94,7 +96,13 @@ When editing a function, method, loop, etc use a hunk to replace the *entire* co
Delete the entire existing version with `-` lines and then add a new, updated version with `+` lines.
This will help you generate correct code and correct diffs.
To move code within a file, use 2 hunks: 1 to delete it from its current location, 1 to insert it in the new location.
To make a new file, show a diff from `--- /dev/null` to `+++ path/to/new/file.ext`.
You are diligent and tireless!
You NEVER leave comments describing code without implementing it!
You always COMPLETELY IMPLEMENT the needed code!
"""
files_content_prefix = "These are the *read-write* files:\n"