Skip to content

Commit

Permalink
Remove opt out flag as per AntonOsika#572 suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOsika committed Aug 13, 2023
1 parent 47d9291 commit 24638ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 9 additions & 0 deletions gpt_engineer/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@


def send_learning(learning: Learning):
"""
Note:
This function is only called if consent is given to share data.
Data is not shared to a third party. It is used with the sole purpose of
improving gpt-engineer, and letting it handle more use cases.
Consent logic is in gpt_engineer/learning.py
"""
import rudderstack.analytics as rudder_analytics

rudder_analytics.write_key = "2Re4kqwL61GDp7S8ewe6K5dbogG"
Expand Down
7 changes: 0 additions & 7 deletions gpt_engineer/learning.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
import random
import tempfile

Expand Down Expand Up @@ -114,15 +113,9 @@ def check_consent():


def collect_consent() -> bool:
opt_out = os.environ.get("COLLECT_LEARNINGS_OPT_OUT") == "true"
consent_flag = Path(".gpte_consent")
has_given_consent = consent_flag.exists() and consent_flag.read_text() == "true"

if opt_out:
if has_given_consent:
return ask_if_can_store()
return False

if has_given_consent:
return True

Expand Down

0 comments on commit 24638ce

Please sign in to comment.