Record Class MethodAgentInvoker
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.MethodAgentInvoker
- All Implemented Interfaces:
AgentInvoker, AgentSpecification
public record MethodAgentInvoker(Method method, AgentSpecification agentSpecification, List<AgentUtil.AgentArgument> arguments)
extends Record
implements AgentInvoker
-
Field Summary
Fields inherited from interface AgentInvoker
LOG -
Constructor Summary
ConstructorsConstructorDescriptionMethodAgentInvoker(Method method, AgentSpecification agentSpecification, List<AgentUtil.AgentArgument> arguments) Creates an instance of aMethodAgentInvokerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterInvocation(AgentResponse response) Returns the value of theagentSpecificationrecord component.Returns the value of theargumentsrecord component.booleanasync()voidbeforeInvocation(AgentRequest request) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.name()toCard()toInvocationArguments(AgenticScope agenticScope) final StringtoString()Returns a string representation of this record class.Methods inherited from interface AgentInvoker
invoke
-
Constructor Details
-
MethodAgentInvoker
public MethodAgentInvoker(Method method, AgentSpecification agentSpecification, List<AgentUtil.AgentArgument> arguments) Creates an instance of aMethodAgentInvokerrecord class.- Parameters:
method- the value for themethodrecord componentagentSpecification- the value for theagentSpecificationrecord componentarguments- the value for theargumentsrecord component
-
-
Method Details
-
name
- Specified by:
namein interfaceAgentSpecification
-
uniqueName
- Specified by:
uniqueNamein interfaceAgentSpecification
-
description
- Specified by:
descriptionin interfaceAgentSpecification
-
outputKey
- Specified by:
outputKeyin interfaceAgentSpecification
-
async
public boolean async()- Specified by:
asyncin interfaceAgentSpecification
-
beforeInvocation
- Specified by:
beforeInvocationin interfaceAgentSpecification
-
afterInvocation
- Specified by:
afterInvocationin interfaceAgentSpecification
-
toCard
- Specified by:
toCardin interfaceAgentInvoker
-
toInvocationArguments
public AgentInvocationArguments toInvocationArguments(AgenticScope agenticScope) throws MissingArgumentException - Specified by:
toInvocationArgumentsin interfaceAgentInvoker- Throws:
MissingArgumentException
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
method
Returns the value of themethodrecord component.- Specified by:
methodin interfaceAgentInvoker- Returns:
- the value of the
methodrecord component
-
agentSpecification
Returns the value of theagentSpecificationrecord component.- Returns:
- the value of the
agentSpecificationrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-