Record Class RoutingNode.RoutingDecision
java.lang.Object
java.lang.Record
com.alibaba.cloud.ai.graph.agent.flow.node.RoutingNode.RoutingDecision
- Enclosing class:
- RoutingNode
Response record for structured routing decision output.
Supports both single agent (backward compatibility) and multiple agents (for parallel execution).
The BeanOutputConverter will populate either 'agent' or 'agents' field based on LLM response.
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingDecision(String agent) Constructor that accepts a single agent (for backward compatibility)RoutingDecision(String agent, List<String> agents) Canonical constructor - handles both single and multiple agent responsesRoutingDecision(List<String> agents) Constructor that accepts multiple agents -
Method Summary
Modifier and TypeMethodDescriptionagent()Returns the value of theagentrecord component.agents()Returns the value of theagentsrecord component.final booleanIndicates whether some other object is "equal to" this one.Gets the list of agents, preferring the agents field over single agentfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RoutingDecision
Canonical constructor - handles both single and multiple agent responses -
RoutingDecision
Constructor that accepts a single agent (for backward compatibility) -
RoutingDecision
Constructor that accepts multiple agents
-
-
Method Details
-
getAgents
Gets the list of agents, preferring the agents field over single agent -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
agent
Returns the value of theagentrecord component.- Returns:
- the value of the
agentrecord component
-
agents
Returns the value of theagentsrecord component.- Returns:
- the value of the
agentsrecord component
-