gpt-engineer
gpt-engineer copied to clipboard
My first run doesn't what I expected
Hi,
I just run python3 main.py tictactoe (tictactoe was the name of the folder, where I put main_prompt with the following content: ""We are writing tic-tac-toe game in python. MVC components split in separate files. Keyboard control.")
Unfortunately, there were no .py files generated. Only "python" (without any extension) file with:
from typing import List, Tuple
class View: def init(self, size: int): self.size = size
def display_board(self, board: List[List[str]]) -> None:
print('\n'.join(['|'.join(row) for row in board]))
def display_message(self, message: str) -> None:
print(message)
def get_move(self) -> Tuple[int, int]:
while True:
try:
row = int(input('Enter row: '))
col = int(input('Enter column: '))
return row, col
except ValueError:
print('Invalid input. Please enter integers for row and column.')
And all_output.txt which started with:
Core classes, functions, and methods:
- Model: responsible for the game logic and state management.
__init__(self, size: int): initializes the game board with the given size.
thus I cannot compile it.
I expected this tool to create .py files, so it's ready to be run. Is there anything I did wrong?
Good question!
Do you want to send the whole all_output.txt?
Welcome to reality. GPT cant write real working code. It's a language model predicting the next word token. It does not have an understanding of actual programming. Well, it doesn't have an understanding at all.
I guess it will be confusing for folks because the example shows that the output are py files instead of a text output.
Files should be created. There are people working on a better approach to make sure it always does, sometimes it doesn't because the output from ChatGPT isn't always the same and this is taken care of via a regex that needs some tweaking, see #35 .
Closing in favor of #35