Uses of Class
dev.langchain4j.guardrail.ToolOutputGuardrailResult
Packages that use ToolOutputGuardrailResult
Package
Description
-
Uses of ToolOutputGuardrailResult in dev.langchain4j.guardrail
Subclasses with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.guardrailModifier and TypeClassDescriptionclassTheGuardrailExecutorforToolOutputGuardrails.static classBuilder class for constructing instances ofToolOutputGuardrailExecutor.Subinterfaces with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.guardrailModifier and TypeInterfaceDescriptioninterfaceA tool output guardrail is a rule applied after a tool was executed, to validate or rewrite the result before the LLM sees it.Classes in dev.langchain4j.guardrail that implement interfaces with type arguments of type ToolOutputGuardrailResultModifier and TypeClassDescriptionfinal classThe result of the validation of aToolOutputGuardrail.Methods in dev.langchain4j.guardrail that return ToolOutputGuardrailResultModifier and TypeMethodDescriptionprotected ToolOutputGuardrailResultToolOutputGuardrailExecutor.composeResult(ToolOutputGuardrailResult oldResult, ToolOutputGuardrailResult newResult) Composes the results likeAbstractGuardrailExecutor.composeResult(GuardrailResult, GuardrailResult), additionally making sure that a text rewrite following a contents rewrite does not lose the latter: the composed result is the contents rewrite with the text replaced.protected ToolOutputGuardrailResultToolOutputGuardrailExecutor.createFailure(List<ToolOutputGuardrailResult.Failure> failures) protected ToolOutputGuardrailResultToolOutputGuardrailExecutor.createSuccess()default ToolOutputGuardrailResultProduces a non-fatal failure.default ToolOutputGuardrailResultProduces a non-fatal failure, seeToolOutputGuardrail.failure(String).default ToolOutputGuardrailResultProduces a fatal failure.default ToolOutputGuardrailResultProduces a fatal failure, seeToolOutputGuardrail.fatal(String).default ToolOutputGuardrailResultToolOutputGuardrail.success()Produces a successful result without any rewrite.static ToolOutputGuardrailResultToolOutputGuardrailResult.success()Gets a successful tool output guardrail result.default ToolOutputGuardrailResultToolOutputGuardrail.successWith(@Nullable String rewrittenText) Produces a successful result with rewritten text: the text contents of the tool result are replaced, the other contents and the error flag are kept.default ToolOutputGuardrailResultToolOutputGuardrail.successWith(List<Content> rewrittenContents, boolean isError) Produces a successful result that replaces all the contents of the tool result and its error flag.static ToolOutputGuardrailResultToolOutputGuardrailResult.successWith(@Nullable String rewrittenText) Produces a successful result with rewritten text.static ToolOutputGuardrailResultToolOutputGuardrailResult.successWith(List<Content> rewrittenContents, boolean isError) Produces a successful result that replaces all the contents of the tool result and its error flag.ToolOutputGuardrail.validate(ToolOutputGuardrailRequest request) Validates the result of a tool execution, including error results (ToolOutputGuardrailRequest.isError()).Methods in dev.langchain4j.guardrail with parameters of type ToolOutputGuardrailResultModifier and TypeMethodDescriptionprotected ToolOutputGuardrailResultToolOutputGuardrailExecutor.composeResult(ToolOutputGuardrailResult oldResult, ToolOutputGuardrailResult newResult) Composes the results likeAbstractGuardrailExecutor.composeResult(GuardrailResult, GuardrailResult), additionally making sure that a text rewrite following a contents rewrite does not lose the latter: the composed result is the contents rewrite with the text replaced. -
Uses of ToolOutputGuardrailResult in dev.langchain4j.observability.api.event
Subclasses with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.observability.api.eventModifier and TypeClassDescriptionstatic classBuilder forToolOutputGuardrailExecutedEventinstances.Subinterfaces with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.observability.api.eventModifier and TypeInterfaceDescriptioninterfaceRepresents an event triggered upon the execution of a tool output guardrail. -
Uses of ToolOutputGuardrailResult in dev.langchain4j.observability.api.listener
Subinterfaces with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.observability.api.listenerModifier and TypeInterfaceDescriptioninterfaceA listener forToolOutputGuardrailExecutedEvents, triggered upon the execution of tool output guardrails. -
Uses of ToolOutputGuardrailResult in dev.langchain4j.observability.event
Subclasses with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.observability.eventModifier and TypeClassDescriptionclassDefault implementation ofToolOutputGuardrailExecutedEvent. -
Uses of ToolOutputGuardrailResult in dev.langchain4j.service.guardrail
Methods in dev.langchain4j.service.guardrail that return ToolOutputGuardrailResultModifier and TypeMethodDescriptionToolGuardrailService.executeOutputGuardrails(ToolGuardrailService.ToolKey key, ToolOutputGuardrailRequest request) Executes the output guardrails of the tool.Methods in dev.langchain4j.service.guardrail that return types with arguments of type ToolOutputGuardrailResultModifier and TypeMethodDescriptionToolGuardrailService.executeOutputGuardrailsAsync(ToolGuardrailService.ToolKey key, ToolOutputGuardrailRequest request) Non-blocking counterpart ofToolGuardrailService.executeOutputGuardrails(ToolKey, ToolOutputGuardrailRequest): nothing is thrown, a fatal failure, an invalid key or a request that does not match the key fails the returned future. -
Uses of ToolOutputGuardrailResult in dev.langchain4j.spi.guardrail
Subinterfaces with type arguments of type ToolOutputGuardrailResult in dev.langchain4j.spi.guardrailModifier and TypeInterfaceDescriptioninterfaceRepresents a factory for creating instances ofToolOutputGuardrailExecutor.ToolOutputGuardrailExecutorBuilder.