compass.common.base.setup_async_decision_tree#

setup_async_decision_tree(graph_setup_func, usage_sub_label=None, **kwargs)[source]#

Setup an AsyncDecisionTree for ordinance extraction

Parameters:
  • graph_setup_func (callable()) – Factory that returns a fully configured networkx.DiGraph.

  • usage_sub_label (str, optional) – Optional usage label reported to the LLM usage tracker.

  • **kwargs – Keyword arguments forwarded to graph_setup_func.

Returns:

AsyncDecisionTree – Decision tree wrapping the graph produced by graph_setup_func.

Notes

The function asserts that the tree has recorded at least the system prompt before returning the constructed wrapper.