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.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectdeserialize(String llmResponse) Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetInvalidJsonMessage(dev.langchain4j.data.message.AiMessage aiMessage, String json) Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetInvalidJsonReprompt(dev.langchain4j.data.message.AiMessage aiMessage, String json) Deprecated, for removal: This API element is subject to removal in a future version.protected Class<?> Deprecated, for removal: This API element is subject to removal in a future version.protected com.fasterxml.jackson.core.type.TypeReference<?> Deprecated, for removal: This API element is subject to removal in a future version.protected OutputGuardrailResultinvokeInvalidJson(dev.langchain4j.data.message.AiMessage aiMessage, String json) Deprecated, for removal: This API element is subject to removal in a future version.validate(dev.langchain4j.data.message.AiMessage responseFromLLM) Deprecated, for removal: This API element is subject to removal in a future version.Validates the response from the LLM.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkiverse.langchain4j.guardrails.OutputGuardrail
failure, failure, fatal, fatal, reprompt, reprompt, retry, retry, success, successWith, successWith, validate
-
Constructor Details
-
AbstractJsonExtractorOutputGuardrail
protected AbstractJsonExtractorOutputGuardrail()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
validate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:OutputGuardrailValidates the response from the LLM.- Specified by:
validatein interfaceOutputGuardrail- 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
-
getInvalidJsonReprompt
-
deserialize
-
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.
-
JsonExtractorOutputGuardrailinstead