MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/TheoremExplainAgent / merge_dicts

Function merge_dicts

evaluate.py:225–242  ·  view source on GitHub ↗

Recursively merge two dictionaries. Args: dict1 (dict): First dictionary. dict2 (dict): Second dictionary. Returns: dict: Merged dictionary.

(dict1: dict, dict2: dict)

Source from the content-addressed store, hash-verified

223
224
225def merge_dicts(dict1: dict, dict2: dict) -> dict:
226 """
227 Recursively merge two dictionaries.
228
229 Args:
230 dict1 (dict): First dictionary.
231 dict2 (dict): Second dictionary.
232
233 Returns:
234 dict: Merged dictionary.
235 """
236 merged = dict1.copy()
237 for key, value in dict2.items():
238 if key in merged and isinstance(merged[key], dict) and isinstance(value, dict):
239 merged[key] = merge_dicts(merged[key], value)
240 else:
241 merged[key] = value
242 return merged
243
244
245def process_theorem(models, file_path: str, eval_type: str, retry_limit: int,

Callers 1

process_theoremFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected