MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / get_schema_diff

Function get_schema_diff

methods/letta/utils.py:968–979  ·  view source on GitHub ↗
(schema_a, schema_b)

Source from the content-addressed store, hash-verified

966
967
968def get_schema_diff(schema_a, schema_b):
969 # Assuming f_schema and linked_function['json_schema'] are your JSON schemas
970 f_schema_json = json_dumps(schema_a)
971 linked_function_json = json_dumps(schema_b)
972
973 # Compute the difference using difflib
974 difference = list(difflib.ndiff(f_schema_json.splitlines(keepends=True), linked_function_json.splitlines(keepends=True)))
975
976 # Filter out lines that don't represent changes
977 difference = [line for line in difference if line.startswith("+ ") or line.startswith("- ")]
978
979 return "".join(difference)
980
981
982def create_uuid_from_string(val: str):

Callers

nothing calls this directly

Calls 3

json_dumpsFunction · 0.90
listFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected