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

gpt-engineer doesn't respect the COLLECT_LEARNINGS_OPT_OUT=true env variable #786

Closed
peterjdolan opened this issue Oct 11, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@peterjdolan
Copy link

Policy and info

  • Maintainers will close issues that have been stale for 14 days if they contain relevant answers.
  • Adding the label "sweep" will automatically turn the issue into a coded pull request. Works best for mechanical tasks. More info/syntax at: https://docs.sweep.dev/

Expected Behavior

When setting the environment variable COLLECT_LEARNINGS_OPT_OUT=true, no information should be transmitted back to the gpt-engineer developer.

Current Behavior

Based on viewing the verbose execution output, it's clear that even with that environment variable set, information was transmitted back to the developer. On inspecting the consent methods, such as https://github.com/AntonOsika/gpt-engineer/blob/main/gpt_engineer/cli/learning.py#L172, it's clear that the environment variable is never referenced.

This is highly undesirable, considering that this is the mechanism for opting out of data collection described in the terms of use - https://github.com/AntonOsika/gpt-engineer/blob/main/TERMS_OF_USE.md.

Failure Information

I've already transmitted too much information to the developer, and don't feel comfortable adding anything more.

@peterjdolan peterjdolan added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels Oct 11, 2023
@ATheorell ATheorell removed the triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. label Oct 12, 2023
@ATheorell
Copy link
Collaborator

This is a problem with the TERMS_OR_USE (and test_collect.py) not being up to date.
Opting out of collecting learnings is now done with the .gpte_consent file. From learning.py:

def collect_consent() -> bool:
    """
    Check if the user has given consent to store their data.
    If not, ask for their consent.

    Returns
    -------
    bool
        True if the user has given consent, False otherwise.
    """
    consent_flag = Path(".gpte_consent")
    if consent_flag.exists():
        return consent_flag.read_text() == "true"

    if ask_if_can_store():
        consent_flag.write_text("true")
        print()
        print("(If you change your mind, delete the file .gpte_consent)")
        return True
    return False

Thus, what needs to be done is updating the TERMS_OF_USE.

@ATheorell
Copy link
Collaborator

I made a suggestion in #797

@captivus
Copy link
Collaborator

Fixed in PR #806 @ATheorell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants