gpt-engineer
gpt-engineer copied to clipboard
fix(bug): inconsistent file code blocks
an update of https://github.com/AntonOsika/gpt-engineer/pull/287
ChatGPT returns inconsistent formats for files; changing the philosophy to specify the format "Filename: file". This greatly improves the ability of the to_file method to adequately parse file names. This semantic re-enforcement could be applied to other identities, but this seems to a general solution, afaik.
Question: Are you using gpt 3.5?
As for the code, I don't see how this helps.
Also – I believe the best solution is to provide examples for gpt-engineer on what it should look like.
Question: Are you using gpt 3.5?
@AntonOsika I tried it with a 3.5 token and a 4.0 token.
As for the code, I don't see how this helps.
Also – I believe the best solution is to provide examples for gpt-engineer on what it should look like.
Suggestions? @AntonOsika I feel like I provided an example; do you mean a more complete sample - perhaps you mean like a /projects/example/workspace/all_output.txt
then feed it into gpt-engineer
? If to_file
is going to be expecting a format containing a specific symbol as a part of the codeblock, we should make sure that we prompt it for the specific symbol, rather than relying on the user to specify.
Still don't see how this helps. There is already this kind of prompt in the generate
file.
What I meant is something like this in the prompt
please use this format:
subdir/server.js
` ` `javascript
import dependency
function a() {
dependency.run()
}
` ` `
Closing for now
Feel free to try to improve it if you think it is necessary!