Interface GuardrailParams

All Known Implementing Classes:
InputGuardrailParams, OutputGuardrailParams

public interface GuardrailParams
Represents the parameter passed to Guardrail.validate(GuardrailParams)} in order to validate an interaction between a user and the LLM.
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.langchain4j.rag.AugmentationResult
     
    dev.langchain4j.memory.ChatMemory
     
    Recreate this guardrail param with the given input or output text.
  • Method Details

    • memory

      dev.langchain4j.memory.ChatMemory memory()
      Returns:
      the memory, can be null or empty
    • augmentationResult

      dev.langchain4j.rag.AugmentationResult augmentationResult()
      Returns:
      the augmentation result, can be null
    • withText

      GuardrailParams withText(String text)
      Recreate this guardrail param with the given input or output text.
      Parameters:
      text - The text of the rewritten param.
      Returns:
      A clone of this guardrail params with the given input or output text.