Class ArrayLoopStrategy
java.lang.Object
com.alibaba.cloud.ai.graph.agent.flow.agent.loop.ArrayLoopStrategy
- All Implemented Interfaces:
LoopStrategy
JSON array loop strategy that retrieves a JSON array from the current message state,
sends each array element as a message to the model, and returns the result.
By default, the text of the last message is treated as a JSON array, but users can customize the converter.
- Since:
- 2025/11/1
- Author:
- vlsmb
-
Field Summary
Fields inherited from interface com.alibaba.cloud.ai.graph.agent.flow.agent.loop.LoopStrategy
DISPATCH_NODE_NAME, INIT_NODE_NAME, ITERABLE_ELEMENT_COUNT, LOOP_COUNT_PREFIX, LOOP_FLAG_PREFIX, LOOP_LIST_PREFIX, MESSAGE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionArrayLoopStrategy(org.springframework.core.convert.converter.Converter<List<org.springframework.ai.chat.messages.Message>, List<?>> converter) -
Method Summary
Methods 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.agent.flow.agent.loop.LoopStrategy
loopCountKey, loopDispatchNodeName, loopFlagKey, loopInitNodeName, loopListKey, maxLoopCount, tempKeys, uniqueKey
-
Constructor Details
-
ArrayLoopStrategy
-
ArrayLoopStrategy
public ArrayLoopStrategy()
-
-
Method Details
-
loopInit
- Specified by:
loopInitin interfaceLoopStrategy
-
loopDispatch
- Specified by:
loopDispatchin interfaceLoopStrategy
-