Record Class InputGuardrail.InputGuardrailParams
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.guardrails.InputGuardrail.InputGuardrailParams
- Record Components:
userMessage- the user message, cannot benullmemory- the memory, can benullor emptyaugmentationResult- the augmentation result, can benull
- All Implemented Interfaces:
GuardrailParams
- Enclosing interface:
InputGuardrail
public static record InputGuardrail.InputGuardrailParams(dev.langchain4j.data.message.UserMessage userMessage, dev.langchain4j.memory.ChatMemory memory, dev.langchain4j.rag.AugmentationResult augmentationResult)
extends Record
implements GuardrailParams
Represents the parameter passed to
InputGuardrail.validate(InputGuardrailParams).-
Constructor Summary
ConstructorsConstructorDescriptionInputGuardrailParams(dev.langchain4j.data.message.UserMessage userMessage, dev.langchain4j.memory.ChatMemory memory, dev.langchain4j.rag.AugmentationResult augmentationResult) Creates an instance of aInputGuardrailParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.rag.AugmentationResultReturns the value of theaugmentationResultrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.dev.langchain4j.memory.ChatMemorymemory()Returns the value of thememoryrecord component.final StringtoString()Returns a string representation of this record class.dev.langchain4j.data.message.UserMessageReturns the value of theuserMessagerecord component.
-
Constructor Details
-
InputGuardrailParams
public InputGuardrailParams(dev.langchain4j.data.message.UserMessage userMessage, dev.langchain4j.memory.ChatMemory memory, dev.langchain4j.rag.AugmentationResult augmentationResult) Creates an instance of aInputGuardrailParamsrecord class.- Parameters:
userMessage- the value for theuserMessagerecord componentmemory- the value for thememoryrecord componentaugmentationResult- the value for theaugmentationResultrecord component
-
-
Method Details
-
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). -
userMessage
public dev.langchain4j.data.message.UserMessage userMessage()Returns the value of theuserMessagerecord component.- Returns:
- the value of the
userMessagerecord component
-
memory
public dev.langchain4j.memory.ChatMemory memory()Returns the value of thememoryrecord component.- Specified by:
memoryin interfaceGuardrailParams- Returns:
- the value of the
memoryrecord component
-
augmentationResult
public dev.langchain4j.rag.AugmentationResult augmentationResult()Returns the value of theaugmentationResultrecord component.- Specified by:
augmentationResultin interfaceGuardrailParams- Returns:
- the value of the
augmentationResultrecord component
-