Record Class NonAiAgentInstance
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.NonAiAgentInstance
- All Implemented Interfaces:
AgentListenerProvider, AgentInstance
public record NonAiAgentInstance(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener, AgentListener listener)
extends Record
implements AgentInstance, AgentListenerProvider
-
Constructor Summary
ConstructorsConstructorDescriptionNonAiAgentInstance(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener, AgentListener listener) Creates an instance of aNonAiAgentInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.Returns the value of theargumentsrecord component.booleanasync()Returns the value of theasyncrecord component.Returns the value of thecompletionListenerrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinvocationListenerrecord component.listener()Returns the value of thelistenerrecord component.name()Returns the value of thenamerecord component.Returns the value of theoutputKeyrecord component.Returns the value of theoutputTyperecord component.final StringtoString()Returns a string representation of this record class.Class<?> type()Returns the value of thetyperecord component.Methods inherited from interface AgentInstance
leaf
-
Constructor Details
-
NonAiAgentInstance
public NonAiAgentInstance(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener, AgentListener listener) Creates an instance of aNonAiAgentInstancerecord class.- Parameters:
type- the value for thetyperecord componentname- the value for thenamerecord componentagentId- the value for theagentIdrecord componentdescription- the value for thedescriptionrecord componentoutputType- the value for theoutputTyperecord componentoutputKey- the value for theoutputKeyrecord componentasync- the value for theasyncrecord componentarguments- the value for theargumentsrecord componentinvocationListener- the value for theinvocationListenerrecord componentcompletionListener- the value for thecompletionListenerrecord componentlistener- the value for thelistenerrecord component
-
-
Method Details
-
subagents
- Specified by:
subagentsin interfaceAgentInstance
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceAgentInstance- Returns:
- the value of the
typerecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceAgentInstance- Returns:
- the value of the
namerecord component
-
agentId
Returns the value of theagentIdrecord component.- Specified by:
agentIdin interfaceAgentInstance- Returns:
- the value of the
agentIdrecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceAgentInstance- Returns:
- the value of the
descriptionrecord component
-
outputType
Returns the value of theoutputTyperecord component.- Specified by:
outputTypein interfaceAgentInstance- Returns:
- the value of the
outputTyperecord component
-
outputKey
Returns the value of theoutputKeyrecord component.- Specified by:
outputKeyin interfaceAgentInstance- Returns:
- the value of the
outputKeyrecord component
-
async
public boolean async()Returns the value of theasyncrecord component.- Specified by:
asyncin interfaceAgentInstance- Returns:
- the value of the
asyncrecord component
-
arguments
Returns the value of theargumentsrecord component.- Specified by:
argumentsin interfaceAgentInstance- Returns:
- the value of the
argumentsrecord component
-
invocationListener
Returns the value of theinvocationListenerrecord component.- Returns:
- the value of the
invocationListenerrecord component
-
completionListener
Returns the value of thecompletionListenerrecord component.- Returns:
- the value of the
completionListenerrecord component
-
listener
Returns the value of thelistenerrecord component.- Specified by:
listenerin interfaceAgentListenerProvider- Returns:
- the value of the
listenerrecord component
-