Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing chat parsing issues that result in wrong files #87

Closed
wants to merge 0 commits into from

Conversation

goncalomoita
Copy link
Contributor

Improved parsing function (parse_chat) which directly affects the file generation process.

"parse_chat", which is located in gpt_engineer/chat_to_files.py, is now able to discern filenames by searching in specific areas near the code block.
Rather than performing filename pattern matching on the entire prompt completion output, the new approach looks for
the filename in logical spots (just like a human would).

Also included a tests file tests/test_chat_parser.py, that checks if parse_chat is working properly for a plethora of code formatting techniques.

@NoCLin
Copy link
Contributor

NoCLin commented Jun 17, 2023

could you please take a look and test it? #94

@goncalomoita
Copy link
Contributor Author

I like this idea for self-reviewing and improving the code itself. I've talked about using this for parsing in #35:

"""
I thought about the problem of ensuring a consistent format when deciding whether or not to improve this parser. My initial thought was "Does better parsing make sense? Can I fix this with a "self-review" call to a LLM? Should I call the LLM just to find what the filenames are?".
Those are possible solutions but they add performance overhead, since you have to wait for another inference, and ultimately cost.
"""

But I encourage you to do this for a "self-reviewer", a sort-of senior programmer that fixes the mistakes of a junior 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants