A Tracer Implementation that records activity to Weights & Biases.
Utility to flatten a nest run object into a list of runs. :param run: The base run to flatten. :return: The flattened list of runs.
Utility to truncate a list of runs dictionaries to only keep the specified keys in each run. :param runs: The list of runs to truncate. :param keep_keys: The keys to keep in each run. :return: The truncated list of runs.
Utility to modify the serialized field of a list of runs dictionaries. removes any keys that match the exact_keys and any keys that contain any of the partial_keys. recursively moves the dictionaries under the kwargs key to the top level. changes the "id" field to a string "_kind" field that tells WBTraceTree how to visualize the run. promotes the "serialized" field to the top level. :param runs: The list of runs to modify. :param exact_keys: A tuple of keys to remove from the serialized field. :param partial_keys: A tuple of partial keys to remove from the serialized field. :return: The modified list of runs.
Builds a nested dictionary from a list of runs. :param runs: The list of runs to build the tree from. :return: The nested dictionary representing the langchain Run in a tree structure compatible with WBTraceTree.