RoutePilot / GraphRouter_eval /configs /process_llm_configs.py
cmulgy's picture
add demo
41b743c
raw
history blame contribute delete
619 Bytes
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.")