Package com.alibaba.cloud.ai.node
Class AbstractPlanBasedNode
java.lang.Object
com.alibaba.cloud.ai.node.AbstractPlanBasedNode
- All Implemented Interfaces:
NodeAction
- Direct Known Subclasses:
PlanExecutorNode,PythonAnalyzeNode,PythonExecuteNode,PythonGenerateNode,SemanticConsistencyNode,SqlExecuteNode
Abstract base class for plan-based execution nodes Provides common functionality for
nodes that execute based on predefined plans
- Author:
- zhangshenghang
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExecutionStepGet the current execution step from the planprotected IntegergetCurrentStepNumber(OverAllState state) Get the current step number from stateprotected PlangetPlan(OverAllState state) Get the plan object from stateprotected voidLog node entryprotected voidlogNodeOutput(String outputKey, Object output) Log node outputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.cloud.ai.graph.action.NodeAction
apply
-
Constructor Details
-
AbstractPlanBasedNode
protected AbstractPlanBasedNode()
-
-
Method Details
-
getCurrentExecutionStep
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
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
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
Log node output
-