Class AbstractPlanBasedNode

java.lang.Object
com.alibaba.cloud.ai.node.AbstractPlanBasedNode
All Implemented Interfaces:
NodeAction
Direct Known Subclasses:
PlanExecutorNode, PythonAnalyzeNode, PythonExecuteNode, PythonGenerateNode, SemanticConsistencyNode, SqlExecuteNode

public abstract class AbstractPlanBasedNode extends Object implements NodeAction
Abstract base class for plan-based execution nodes Provides common functionality for nodes that execute based on predefined plans
Author:
zhangshenghang
  • Constructor Details

    • AbstractPlanBasedNode

      protected AbstractPlanBasedNode()
  • Method Details

    • getCurrentExecutionStep

      protected ExecutionStep getCurrentExecutionStep(OverAllState state)
      Get the current execution step from the plan
      Parameters:
      state - the overall state containing plan information
      Returns:
      the current execution step
      Throws:
      IllegalStateException - if plan output is empty, plan parsing fails, or step index is out of range
    • getPlan

      protected Plan getPlan(OverAllState state)
      Get the plan object from state
      Parameters:
      state - the overall state containing plan information
      Returns:
      the parsed plan object
      Throws:
      IllegalStateException - if plan output is empty or plan parsing fails
    • getCurrentStepNumber

      protected Integer getCurrentStepNumber(OverAllState state)
      Get the current step number from state
      Parameters:
      state - the overall state
      Returns:
      the current step number (defaults to 1 if not set)
    • logNodeEntry

      protected void logNodeEntry()
      Log node entry
    • logNodeOutput

      protected void logNodeOutput(String outputKey, Object output)
      Log node output