-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
31 lines (25 loc) · 874 Bytes
/
config.py
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
# Configuration mainly for the MastabaAgent Solution
INDIVIDUAL_PROMPT_DEFAULT = True
PROMPT_SOLUTIONS_DICT = {
"vanilla": "civ_prompts",
"Settlers": "test_prompts_01_settlers",
# "city": "",
"Explorer": "test_prompts_02_explorers",
"Workers": "test_prompts_03_workers",
"_final": "civ_prompts",
# all other entities, should be some "other_prompts"
}
class DictDefaultWrapper(dict):
"""
Wrapper of dict, for the below use.
"""
def __getitem__(self, key):
if key in self.keys():
return super().__getitem__(key)
if "_final" in self.keys():
return super().__getitem__("_final")
else:
raise KeyError(
"`PROMPRT_SOLUTIONS_DICT` in config.py does not have key '_final' defined."
)
PROMPT_SOLUTIONS = DictDefaultWrapper(PROMPT_SOLUTIONS_DICT)