gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

Prompt in project directory but still get AssertionError

Open thatgenericguy opened this issue 2 years ago • 1 comments

I installed the stable release using pip. When I try to run: gpt-engineer projects/example I get "AssertionError: Please put your prompt in the file prompt in the project directory" I have tried: -Creating a text file 'prompt' with the prompt inside of "example" -Creating a folder called 'prompt' where I have the same text file within -Using powershell within Visual Studio as a project -Using powershell externally -Using cmd -Renaming the prompt file as 'main_prompt'

Nothing seems to work. Please help.

Steps to Reproduce:

  1. In cmd run pip install gpt-engineer
  2. Create main folder "gpt-test" on desktop
  3. Create folders: "projects/example" within "gpt-test"
  4. Create prompt.txt within "example" with a prompt
  5. In cmd run cd desktop/gpt-test
  6. Then run set OPENAI_API_KEY=[your api key]
  7. Then run gpt-engineer projects/example

thatgenericguy avatar Jul 12 '23 19:07 thatgenericguy

The prompt file should be named prompt without extension.

healthybinary avatar Jul 13 '23 05:07 healthybinary

I have the same problem, identical behavior, prompt file, without extension, on windows cmd with admin rights. Its seems to not detect that there is a text inside.

image

petrk94 avatar Jul 17 '23 19:07 petrk94

I have the same problem, identical behavior, prompt file, without extension, on windows cmd with admin rights. Its seems to not detect that there is a text inside.

image

Hmm, did you make sure to save it with quotation marks around it: “prompt”? And make sure to save it under ‘all files’ as well. That worked for me.

thatgenericguy avatar Jul 17 '23 21:07 thatgenericguy

I have the same problem, identical behavior, prompt file, without extension, on windows cmd with admin rights. Its seems to not detect that there is a text inside.

image

I'll try to make a pull request to include the .txt files also. Would you please list the files in the folder? Currently, how it works you should create a prompt file without an extension inside a folder and pass that folder to the "gpt-engineer your-folder"

healthybinary avatar Jul 17 '23 23:07 healthybinary

A workaround for this problem is to open the prompt file in Notepad++ save it as "Unix script file". The new file will be saved with the ".bash" extension. Edit the file name and delete the .bash extension. Then run your command. It seems the problem is the formatting of the file.

ioanfesteu avatar Jul 26 '23 08:07 ioanfesteu