Record Class InputGuardrailParams
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.guardrails.InputGuardrailParams
- Record Components:
userMessage
- the user message, cannot benull
memory
- the memory, can benull
or emptyaugmentationResult
- the augmentation result, can benull
- All Implemented Interfaces:
GuardrailParams
public record 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 aInputGuardrailParams
record class. -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.rag.AugmentationResult
Returns the value of theaugmentationResult
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.dev.langchain4j.memory.ChatMemory
memory()
Returns the value of thememory
record component.final String
toString()
Returns a string representation of this record class.dev.langchain4j.data.message.UserMessage
Returns the value of theuserMessage
record 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 aInputGuardrailParams
record class.- Parameters:
userMessage
- the value for theuserMessage
record componentmemory
- the value for thememory
record componentaugmentationResult
- the value for theaugmentationResult
record component
-
-
Method Details
-
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)
. -
userMessage
public dev.langchain4j.data.message.UserMessage userMessage()Returns the value of theuserMessage
record component.- Returns:
- the value of the
userMessage
record component
-
memory
public dev.langchain4j.memory.ChatMemory memory()Returns the value of thememory
record component.- Specified by:
memory
in interfaceGuardrailParams
- Returns:
- the value of the
memory
record component
-
augmentationResult
public dev.langchain4j.rag.AugmentationResult augmentationResult()Returns the value of theaugmentationResult
record component.- Specified by:
augmentationResult
in interfaceGuardrailParams
- Returns:
- the value of the
augmentationResult
record component
-