Record Class AgentSpecificationImpl
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.AgentSpecificationImpl
- All Implemented Interfaces:
AgentSpecification
public record AgentSpecificationImpl(String name, String uniqueName, String description, String outputKey, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener)
extends Record
implements AgentSpecification
-
Constructor Summary
ConstructorsConstructorDescriptionAgentSpecificationImpl(String name, String uniqueName, String description, String outputKey, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterInvocation(AgentResponse response) 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.Returns the value of theuniqueNamerecord component.
-
Constructor Details
-
AgentSpecificationImpl
public AgentSpecificationImpl(String name, String uniqueName, String description, String outputKey, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImplrecord class.- Parameters:
name- the value for thenamerecord componentuniqueName- the value for theuniqueNamerecord componentdescription- the value for thedescriptionrecord componentoutputKey- the value for theoutputKeyrecord componentasync- the value for theasyncrecord 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 interfaceAgentSpecification- Returns:
- the value of the
namerecord component
-
uniqueName
Returns the value of theuniqueNamerecord component.- Specified by:
uniqueNamein interfaceAgentSpecification- Returns:
- the value of the
uniqueNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceAgentSpecification- Returns:
- the value of the
descriptionrecord component
-
outputKey
Returns the value of theoutputKeyrecord component.- Specified by:
outputKeyin interfaceAgentSpecification- 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
-
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
-