ThinkNode
This class implements a tree node that stores content (text describing a reasoning step), maintains parent-child relationships, tracks node statistics, and provides utilities for traversing/visualizing the reasoning path.
Parameters:
Static Methods
from_dict
Parameters:
Returns:
Instance Attributes
trajectory
Get a formatted string representation of the path from root to this node.
Returns:
str: A formatted string showing the question and each step in the reasoning process
Instance Methods
backpropagate
Parameters:
to_dict
Returns:
dict[str, Any]: dictionary containing all node attributes and recursive children Returns: