Record Class AgentSpecificationImpl
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.AgentSpecificationImpl
- All Implemented Interfaces:
AgentSpecification, AgentInstance
public record AgentSpecificationImpl(String name, String agentId, String description, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener)
extends Record
implements AgentSpecification
-
Constructor Summary
ConstructorsConstructorDescriptionAgentSpecificationImpl(String name, String agentId, String description, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImplrecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AgentSpecificationImpl
public AgentSpecificationImpl(String name, String agentId, String description, String outputKey, boolean async, List<AgentArgument> arguments, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImplrecord class.- Parameters:
name- the value for thenamerecord componentagentId- the value for theagentIdrecord componentdescription- the value for thedescriptionrecord 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
-
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. -
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
-
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
-