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

First step in making gpt-engineer learn. Rename main_prompt -> prompt #381

Merged
merged 5 commits into from
Jun 24, 2023

Conversation

AntonOsika
Copy link
Owner

No description provided.

@AntonOsika AntonOsika requested a review from patillacode June 24, 2023 15:30
@AntonOsika
Copy link
Owner Author

Merging! Please ping me if you see something bad @patillacode 🙏

@AntonOsika AntonOsika merged commit f159dc4 into main Jun 24, 2023
@AntonOsika AntonOsika deleted the ao/learn branch June 24, 2023 15:53
Comment on lines +54 to +55
rudder_analytics.write_key = "2Re4kqwL61GDp7S8ewe6K5dbogG"
rudder_analytics.dataPlaneUrl = "https://gptengineerezm.dataplane.rudderstack.com"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntonOsika
isn't this a bit dangerous to be in plain here?

@@ -16,7 +16,7 @@ def main():
if benchmark.is_dir():
print(f"Cleaning {benchmark}")
for path in benchmark.iterdir():
if path.name == "main_prompt":
if path.name in ["prompt", "main_prompt"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you left the main_prompt for some compatibility although you renamed all prompts?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest if "prompt" in path.name.lower(): for future compatibility.

Comment on lines +25 to +33
"""While we migrate we have this fallback getter"""
assert (
"prompt" in dbs.input or "main_prompt" in dbs.input
), "Please put your prompt in the file `prompt` in the project directory"

if "prompt" not in dbs.input:
print(
colored("Please put the prompt in the file `prompt`, not `main_prompt", "red")
)
Copy link
Collaborator

@patillacode patillacode Jun 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this is a bit more readable but not a big deal (especially since this is just for the transition)

def get_prompt(dbs):
    if ("main_prompt" in dbs.input) or ("prompt" not in dbs.input):
        colored("Please put your prompt in a file called `prompt` in the project directory", "red")
        

Or even just (not caring about main_prompt at all:

def get_prompt(dbs):
    if "prompt" not in dbs.input:
        colored("Please put your prompt in a file called `prompt` in the project directory", "red")
        

- `gpt-engineer projects/my-new-project`
- (Note, `gpt-engineer --help` lets you see all available options. For example `--steps use_feedback` lets you improve/fix code in a project)

**Results**:
By running gpt-engineer you agree to our [ToS](https://github.com/AntonOsika/gpt-engineer/TERMS_OF_USE.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This points to no file (I guess is a WIP, just surfacing it)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not intended – blunder by me

Comment on lines +79 to +82
def collect_learnings(model: str, temperature: float, steps: list[Step], dbs: DBs):
if os.environ.get("COLLECT_LEARNINGS_OPT_OUT") in ["true", "1"]:
print("COLLECT_LEARNINGS_OPT_OUT is set to true, not collecting learning")
return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cherry picking here:

It is usually a bit more intuitive to use True for "positive" values.
In this case, COLLECT_LEARNINGS_OPT_IN set to True to collect and to False to not collect
Rather than COLLECT_LEARNINGS_OPT_OUT set to True to not collect

70ziko pushed a commit to 70ziko/gpt-engineer that referenced this pull request Oct 25, 2023
…AntonOsika#381)

* First step in collecting learnings

* Rename prompts

* remove requirements, use pip install -e . instead

* Add requirements

* Fix tests
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.

3 participants