Spaces:
Running
Running
File size: 619 Bytes
41b743c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import json
# Read the input JSON file
with open('/data/taofeng2/Router_bench/zijie/router_bench_baseline/GraphRouter/configs/new_LLM_Descriptions.json', 'r') as f:
data = json.load(f)
# Create a new dictionary with _think keys
new_data = {}
for key, value in data.items():
new_data[key] = value
new_data[f"{key}_think"] = value
# Write the output JSON file
with open('/data/taofeng2/Router_bench/zijie/router_bench_baseline/GraphRouter/configs/new_LLM_Descriptions_with_think.json', 'w') as f:
json.dump(new_data, f, indent=2)
print("Processing complete. New file created with _think keys added.") |