Record Class NonAiAgentSpecification
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.NonAiAgentSpecification
- All Implemented Interfaces:
AgentSpecification, AgentInstance
public record NonAiAgentSpecification(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener)
extends Record
implements AgentSpecification
-
Constructor Summary
ConstructorsConstructorDescriptionNonAiAgentSpecification(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aNonAiAgentSpecificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterInvocation(AgentResponse response) agentId()Returns the value of theagentIdrecord component.Returns the value of theargumentsrecord component.booleanasync()Returns the value of theasyncrecord component.voidbeforeInvocation(AgentRequest request) 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.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.
-
Constructor Details
-
NonAiAgentSpecification
public NonAiAgentSpecification(Class<?> type, String name, String agentId, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aNonAiAgentSpecificationrecord 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 component
-
-
Method Details
-
beforeInvocation
- Specified by:
beforeInvocationin interfaceAgentSpecification
-
afterInvocation
- Specified by:
afterInvocationin interfaceAgentSpecification
-
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 interfaceAgentSpecification- 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
-