Package dev.langchain4j.agentic.workflow
Record Class HumanInTheLoop
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.workflow.HumanInTheLoop
- All Implemented Interfaces:
AgentSpecsProvider
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 theinputNamerecord component.Returns the value of theoutputNamerecord component.Returns the value of therequestWriterrecord component.Returns the value of theresponseReaderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HumanInTheLoop
public HumanInTheLoop(String inputName, String outputName, String description, Consumer<String> requestWriter, Supplier<String> responseReader) Creates an instance of aHumanInTheLooprecord class.- Parameters:
inputName- the value for theinputNamerecord componentoutputName- the value for theoutputNamerecord componentdescription- the value for thedescriptionrecord componentrequestWriter- the value for therequestWriterrecord componentresponseReader- the value for theresponseReaderrecord component
-
-
Method Details
-
askUser
-
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). -
inputName
Returns the value of theinputNamerecord component.- Specified by:
inputNamein interfaceAgentSpecsProvider- Returns:
- the value of the
inputNamerecord component
-
outputName
Returns the value of theoutputNamerecord component.- Specified by:
outputNamein interfaceAgentSpecsProvider- Returns:
- the value of the
outputNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceAgentSpecsProvider- Returns:
- the value of the
descriptionrecord component
-
requestWriter
Returns the value of therequestWriterrecord component.- Returns:
- the value of the
requestWriterrecord component
-
responseReader
Returns the value of theresponseReaderrecord component.- Returns:
- the value of the
responseReaderrecord component
-