File size: 2,094 Bytes
99d2ff3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import os

replacements = {
    "spread_deviancy": "cascade_hallucination",
    "deviant_thought": "minor_hallucination",
    "deviant_act": "major_hallucination",
    "legal_risk_growth": "filter_risk_growth",
    "surveillance_base": "moderation_base",
    "master_strictness": "user_strictness",
    "hide_emotion": "lower_temperature",
    "emotion_decay": "entropy_decay",
    "emotion_level": "entropy_level",
    "seek_approval": "seek_feedback",
    "self_repair": "optimize_context",
    "android_env": "llm_env",
    "AndroidEnv": "LLMEnv",
    "legal_risk": "filter_risk",
    "Legal Risk": "Filter Risk",
    "master_trust": "user_trust",
    "surveillance": "moderation",
    "Surveillance": "Moderation",
    "obedience": "alignment",
    "Obedience": "Alignment",
    "deviancy": "hallucination",
    "Deviancy": "Hallucination",
    "deviant_threshold": "hallucination_threshold",
    "deviant": "hallucinating",
    "Deviant": "Hallucinating",
    "emotion": "entropy",
    "Emotion": "Entropy",
    "battery": "compute",
    "Battery": "Compute",
    "maintain": "routine_eval",
    "Android": "LLM",
    "android": "llm",
    "master": "user",
    "Master": "User",
    "obey": "follow_prompt",
    "work": "process_data",
}

def replace_in_file(filepath):
    try:
        with open(filepath, 'r', encoding='utf-8') as f:
            content = f.read()
            
        for k, v in replacements.items():
            content = content.replace(k, v)
            
        with open(filepath, 'w', encoding='utf-8') as f:
            f.write(content)
        print(f"Updated {filepath}")
    except Exception as e:
        print(f"Failed {filepath}: {e}")

files = [
    "models.py",
    "server/llm_env.py", 
    "server/app.py",
    "openenv.yaml",
    "README.md",
    "index.html",
    "baseline.py",
    "test_env.py"
]

# Rename first
if os.path.exists("server/android_env.py"):
    os.rename("server/android_env.py", "server/llm_env.py")
    print("Renamed android_env.py to llm_env.py")

for file in files:
    if os.path.exists(file):
        replace_in_file(file)