Class RoutingMergeNode
java.lang.Object
com.alibaba.cloud.ai.graph.agent.flow.node.RoutingMergeNode
- All Implemented Interfaces:
NodeAction
Dedicated node for merging routing results. Collects outputs from sub-agents routed by
LlmRoutingAgent, synthesizes them via LLM into a single coherent answer, and writes the
merged result to state.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRoutingMergeNode(org.springframework.ai.chat.model.ChatModel chatModel, List<BaseAgent> subAgents) RoutingMergeNode(org.springframework.ai.chat.model.ChatModel chatModel, List<BaseAgent> subAgents, String mergedOutputKey) -
Method Summary
Modifier and TypeMethodDescriptionapply(OverAllState state) static StringextractText(Object output, String outputKey)
-
Field Details
-
DEFAULT_MERGED_OUTPUT_KEY
Default key for the merged result in state.- See Also:
-
-
Constructor Details
-
RoutingMergeNode
-
RoutingMergeNode
-
-
Method Details
-
apply
- Specified by:
applyin interfaceNodeAction- Throws:
Exception
-
extractText
-