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
ConstructorsModifierConstructorDescriptionprotected
Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
deserialize
(String llmResponse) Deprecated, for removal: This API element is subject to removal in a future version.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.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.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 OutputGuardrailResult
invokeInvalidJson
(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, wait
Methods 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:OutputGuardrail
Validates the response from the LLM.- Specified by:
validate
in 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.
-
JsonExtractorOutputGuardrail
instead