Package dev.langchain4j.agentic.internal
Record Class MethodAgentInvoker
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.MethodAgentInvoker
- All Implemented Interfaces:
AgentInvoker
public record MethodAgentInvoker(Method method, String name, String description, String outputName, List<AgentUtil.AgentArgument> arguments)
extends Record
implements AgentInvoker
-
Constructor Summary
ConstructorsConstructorDescriptionMethodAgentInvoker
(Method method, String name, String description, String outputName, List<AgentUtil.AgentArgument> arguments) Creates an instance of aMethodAgentInvoker
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thearguments
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.method()
Returns the value of themethod
record component.name()
Returns the value of thename
record component.Returns the value of theoutputName
record component.toCard()
Object[]
toInvocationArguments
(AgenticScope agenticScope) final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.langchain4j.agentic.internal.AgentInvoker
invoke
-
Constructor Details
-
MethodAgentInvoker
public MethodAgentInvoker(Method method, String name, String description, String outputName, List<AgentUtil.AgentArgument> arguments) Creates an instance of aMethodAgentInvoker
record class.- Parameters:
method
- the value for themethod
record componentname
- the value for thename
record componentdescription
- the value for thedescription
record componentoutputName
- the value for theoutputName
record componentarguments
- the value for thearguments
record component
-
-
Method Details
-
toCard
- Specified by:
toCard
in interfaceAgentInvoker
-
toInvocationArguments
- Specified by:
toInvocationArguments
in interfaceAgentInvoker
- Throws:
MissingArgumentException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 themethod
record component.- Specified by:
method
in interfaceAgentInvoker
- Returns:
- the value of the
method
record component
-
name
Returns the value of thename
record component.- Specified by:
name
in interfaceAgentInvoker
- Returns:
- the value of the
name
record component
-
description
Returns the value of thedescription
record component.- Specified by:
description
in interfaceAgentInvoker
- Returns:
- the value of the
description
record component
-
outputName
Returns the value of theoutputName
record component.- Specified by:
outputName
in interfaceAgentInvoker
- Returns:
- the value of the
outputName
record component
-
arguments
Returns the value of thearguments
record component.- Returns:
- the value of the
arguments
record component
-