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 aMethodAgentInvokerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord 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.method()Returns the value of themethodrecord component.name()Returns the value of thenamerecord component.Returns the value of theoutputNamerecord component.toCard()Object[]toInvocationArguments(AgenticScope agenticScope) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aMethodAgentInvokerrecord class.- Parameters:
method- the value for themethodrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentoutputName- the value for theoutputNamerecord componentarguments- the value for theargumentsrecord component
-
-
Method Details
-
toCard
- Specified by:
toCardin interfaceAgentInvoker
-
toInvocationArguments
- Specified by:
toInvocationArgumentsin 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 themethodrecord component.- Specified by:
methodin interfaceAgentInvoker- Returns:
- the value of the
methodrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceAgentInvoker- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceAgentInvoker- Returns:
- the value of the
descriptionrecord component
-
outputName
Returns the value of theoutputNamerecord component.- Specified by:
outputNamein interfaceAgentInvoker- Returns:
- the value of the
outputNamerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-