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

[Enhancement]: Proactively solve the "port number" instead of asking the human to edit a file.

Open YosuCadilla opened this issue 1 year ago • 1 comments

Version

Command-line (Python) version

Suggestion

On the CLI it is a bit of a pain to manually edit files, especially if GPTP asks 8 times in a row.

a) Suggest a port instead of requesting manual input to edit files. Example: Can I use port XXXXX? Pres enter for Yes or introduce a new port number.

Or alternatively b) scan the system for an empty port and use it instead of requesting manual input to edit files. Example: After checking your system, I have found port 23456 to be unused...

--- Example of what prompted me to write this request --- Updated file /root/gpt-pilot/workspace/m-deploy-py-33/app.py Input required on line 10: app.run(host='0.0.0.0', port=8080) // INPUT_REQUIRED {Choose a different port if 8080 is not available}

? Please open the file app.py on the line 10 and add the required input. Once you're done, type "y" to continue.

YosuCadilla avatar Dec 28 '23 17:12 YosuCadilla

Another use case: I need human intervention:

Replace the placeholder 'api-key-placeholder' in '/lxd_client.py' with the actual API key provided for the project.

If you want to run the app, just type "r" and press ENTER and that will run python app.py

GPTP could instead ask what the API key is and use the input to fix the code instead of asking the human to edit the file manually.

YosuCadilla avatar Dec 28 '23 17:12 YosuCadilla