MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / main

Function main

webarena/scripts/generate_test_data.py:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def main() -> None:
9 with open("config_files/test.raw.json", "r") as f:
10 raw = f.read()
11 raw = raw.replace("__GITLAB__", GITLAB)
12 raw = raw.replace("__REDDIT__", REDDIT)
13 raw = raw.replace("__SHOPPING__", SHOPPING)
14 raw = raw.replace("__SHOPPING_ADMIN__", SHOPPING_ADMIN)
15 raw = raw.replace("__WIKIPEDIA__", WIKIPEDIA)
16 raw = raw.replace("__MAP__", MAP)
17 with open("config_files/test.json", "w") as f:
18 f.write(raw)
19 # split to multiple files
20 data = json.loads(raw)
21 for idx, item in enumerate(data):
22 with open(f"config_files/{idx}.json", "w") as f:
23 json.dump(item, f, indent=2)
24
25
26if __name__ == "__main__":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected