Package org.bsc.langgraph4j
Class NodeOutput<State extends AgentState>
java.lang.Object
org.bsc.langgraph4j.NodeOutput<State>
- Type Parameters:
State- the type of the state associated with the node output
- All Implemented Interfaces:
HasMetadata
- Direct Known Subclasses:
StateSnapshot,StreamingOutput,SubGraphOutput
Represents the output of a node in a graph.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bsc.langgraph4j.HasMetadata
HasMetadata.Builder<B extends HasMetadata.Builder<B>> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeOutput(String node, State state) NodeOutput(String node, State state, HasMetadata metadataSupplier) NodeOutput(NodeOutput<State> nodeOutput) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEND()Checks if the current node refers to the end of the graph processing.booleanisSTART()Checks if the current node refers to the start of the graph processing.return metadata value for keyreturn metadata keysnode()Returns the node name.static <State extends AgentState>
NodeOutput<State>state()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bsc.langgraph4j.HasMetadata
metadata
-
Field Details
-
metadataSupplier
-
-
Constructor Details
-
NodeOutput
-
NodeOutput
-
NodeOutput
-
-
Method Details
-
of
-
node
Returns the node name.- Returns:
- the node name
-
state
-
isSTART
public boolean isSTART()Checks if the current node refers to the start of the graph processing.- Returns:
trueif the current node refers to the start of the graph processing
-
isEND
public boolean isEND()Checks if the current node refers to the end of the graph processing. useful to understand if the workflow has been interrupted.- Returns:
trueif the current node refers to the end of the graph processing
-
toString
-
metadata
Description copied from interface:HasMetadatareturn metadata value for key- Specified by:
metadatain interfaceHasMetadata- Parameters:
key- given metadata key- Returns:
- metadata value for key if any
-
metadataKeys
Description copied from interface:HasMetadatareturn metadata keys- Specified by:
metadataKeysin interfaceHasMetadata- Returns:
- metadata keys if any or empty set
-