MCPcopy Index your code
hub / github.com/going-doer/Paper2Code / load_accumulated_cost

Function load_accumulated_cost

codes/utils.py:267–273  ·  view source on GitHub ↗
(accumulated_cost_file)

Source from the content-addressed store, hash-verified

265 }
266
267def load_accumulated_cost(accumulated_cost_file):
268 if os.path.exists(accumulated_cost_file):
269 with open(accumulated_cost_file, "r", encoding="utf-8") as f:
270 data = json.load(f)
271 return data.get("total_cost", 0.0)
272 else:
273 return 0.0
274
275def save_accumulated_cost(accumulated_cost_file, cost):
276 with open(accumulated_cost_file, "w", encoding="utf-8") as f:

Callers 3

3.1_coding_sh.pyFile · 0.90
2_analyzing.pyFile · 0.90
3_coding.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected