-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Conversation
Merging! Please ping me if you see something bad @patillacode 🙏 |
rudder_analytics.write_key = "2Re4kqwL61GDp7S8ewe6K5dbogG" | ||
rudder_analytics.dataPlaneUrl = "https://gptengineerezm.dataplane.rudderstack.com" |
There was a problem hiding this comment.
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"]: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
"""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") | ||
) |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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
…AntonOsika#381) * First step in collecting learnings * Rename prompts * remove requirements, use pip install -e . instead * Add requirements * Fix tests
No description provided.