Class AbstractJsonExtractorOutputGuardrail

java.lang.Object
io.quarkiverse.langchain4j.guardrails.AbstractJsonExtractorOutputGuardrail
All Implemented Interfaces:
Guardrail<OutputGuardrailParams,OutputGuardrailResult>, OutputGuardrail

@Deprecated(forRemoval=true) public abstract class AbstractJsonExtractorOutputGuardrail extends Object implements OutputGuardrail
Deprecated, for removal: This API element is subject to removal in a future version.
Use JsonExtractorOutputGuardrail instead
  • Constructor Details

    • AbstractJsonExtractorOutputGuardrail

      protected AbstractJsonExtractorOutputGuardrail()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • validate

      public OutputGuardrailResult validate(dev.langchain4j.data.message.AiMessage responseFromLLM)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: OutputGuardrail
      Validates the response from the LLM.
      Specified by:
      validate in interface OutputGuardrail
      Parameters:
      responseFromLLM - the response from the LLM
    • invokeInvalidJson

      protected OutputGuardrailResult invokeInvalidJson(dev.langchain4j.data.message.AiMessage aiMessage, String json)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getInvalidJsonMessage

      protected String getInvalidJsonMessage(dev.langchain4j.data.message.AiMessage aiMessage, String json)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getInvalidJsonReprompt

      protected String getInvalidJsonReprompt(dev.langchain4j.data.message.AiMessage aiMessage, String json)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deserialize

      protected Object deserialize(String llmResponse)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOutputClass

      protected Class<?> getOutputClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOutputType

      protected com.fasterxml.jackson.core.type.TypeReference<?> getOutputType()
      Deprecated, for removal: This API element is subject to removal in a future version.