Class LoopAgentServiceImpl<T>
java.lang.Object
dev.langchain4j.agentic.internal.AbstractServiceBuilder<T, LoopAgentService<T>>
dev.langchain4j.agentic.workflow.impl.LoopAgentServiceImpl<T>
- All Implemented Interfaces:
AgenticService<LoopAgentService<T>, T>, LoopAgentService<T>
public class LoopAgentServiceImpl<T>
extends AbstractServiceBuilder<T, LoopAgentService<T>>
implements LoopAgentService<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BiPredicate<AgenticScope, Integer> protected Stringprotected intprotected booleanFields inherited from class AbstractServiceBuilder
agenticMethod, agentInstanceFactory, agentListener, agentServiceClass, beforeCall, compensateOnError, description, errorHandler, executor, name, output, outputKey, subagents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the agentic service, returning a proxy that can be invoked to execute the configured workflow.static LoopAgentServiceImpl<UntypedAgent> builder()static <T> LoopAgentServiceImpl<T> exitCondition(String exitConditionDescription, BiPredicate<AgenticScope, Integer> exitCondition) exitCondition(String exitConditionDescription, Predicate<AgenticScope> exitCondition) exitCondition(BiPredicate<AgenticScope, Integer> exitCondition) exitCondition(Predicate<AgenticScope> exitCondition) maxIterations(int maxIterations) testExitAtLoopEnd(boolean testExitAtLoopEnd) Methods inherited from class AbstractServiceBuilder
agentInstanceFactory, beforeCall, build, build, compensateOnError, description, errorHandler, executor, listener, name, output, outputKey, outputKey, subAgents, subAgentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AgenticService
beforeCall, compensateOnError, description, errorHandler, listener, name, output, outputKey, outputKey, subAgents, subAgents
-
Field Details
-
maxIterations
protected int maxIterations -
exitCondition
-
exitConditionDescription
-
testExitAtLoopEnd
protected boolean testExitAtLoopEnd
-
-
Constructor Details
-
LoopAgentServiceImpl
-
-
Method Details
-
build
Description copied from interface:AgenticServiceBuilds the agentic service, returning a proxy that can be invoked to execute the configured workflow.- Specified by:
buildin interfaceAgenticService<LoopAgentService<T>, T>- Returns:
- the built agent proxy
-
builder
-
builder
-
maxIterations
- Specified by:
maxIterationsin interfaceLoopAgentService<T>
-
exitCondition
- Specified by:
exitConditionin interfaceLoopAgentService<T>
-
exitCondition
- Specified by:
exitConditionin interfaceLoopAgentService<T>
-
exitCondition
public LoopAgentServiceImpl<T> exitCondition(String exitConditionDescription, Predicate<AgenticScope> exitCondition) - Specified by:
exitConditionin interfaceLoopAgentService<T>
-
exitCondition
public LoopAgentServiceImpl<T> exitCondition(String exitConditionDescription, BiPredicate<AgenticScope, Integer> exitCondition) - Specified by:
exitConditionin interfaceLoopAgentService<T>
-
testExitAtLoopEnd
- Specified by:
testExitAtLoopEndin interfaceLoopAgentService<T>
-
serviceType
- Specified by:
serviceTypein classAbstractServiceBuilder<T, LoopAgentService<T>>
-