compass.common.base.run_async_tree#
- async run_async_tree(tree, response_as_json=True)[source]#
Run an async decision tree and optionally parse JSON output
- Parameters:
tree (
AsyncDecisionTree) – Decision tree to execute.response_as_json (
bool, defaultTrue) – IfTrue, attempts to parse the LLM response as JSON usingcompass.utilities.parsing.llm_response_as_json(). By default,True.
- Returns:
dictorstrorNone– Parsed dictionary whenresponse_as_jsonisTrue, raw response otherwise. ReturnsNoneif execution fails.