compare_funcs

Compute the diff between two function definitions
_a_data = ChatData.load_jsonl('file_a.jsonl') 
_b_data = ChatData.load_jsonl('file_b.jsonl')
Loaded 2284 rows from file_a.jsonl
Loaded 2284 rows from file_b.jsonl

Diff Functions

Some of this code is domain-specific to Rechat.


source

diff_funcs

 diff_funcs (list1:List[dict], list2:List[dict])

Compare two lists of functions.

_diff = diff_funcs(_a_data.funcs, _b_data.funcs)
assert _diff['msg'] == 'No differences found.'

source

explain_func_diff

 explain_func_diff (differences_output)

Use a LLM to provide a human-readable explanation of differences in function definitions.

res = explain_func_diff(_diff)
print(res)
The comparison of the function definitions did not identify any differences.