Interface GuardrailParams

All Known Implementing Classes:
InputGuardrailParams, OutputGuardrailParams

@Deprecated(forRemoval=true) public interface GuardrailParams
Deprecated, for removal: This API element is subject to removal in a future version.
Use GuardrailRequestParams instead
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
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    dev.langchain4j.memory.ChatMemory
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Recreate this guardrail param with the given input or output text.
  • Method Details

    • memory

      dev.langchain4j.memory.ChatMemory memory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the memory, can be null or empty
    • augmentationResult

      dev.langchain4j.rag.AugmentationResult augmentationResult()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the augmentation result, can be null
    • withText

      GuardrailParams withText(String text)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.