Uses of Interface
dev.langchain4j.service.guardrail.GuardedToolExecution
Packages that use GuardedToolExecution
-
Uses of GuardedToolExecution in dev.langchain4j.service.guardrail
Methods in dev.langchain4j.service.guardrail that return GuardedToolExecutionModifier and TypeMethodDescriptionGuardedToolExecution.Builder.build()default GuardedToolExecutionToolGuardrailService.executeGuardrails(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, ToolExecutionResult> tool) Executes a tool call through the tool guardrails of the tool: the input guardrails, thentool, then the output guardrails.Methods in dev.langchain4j.service.guardrail that return types with arguments of type GuardedToolExecutionModifier and TypeMethodDescriptiondefault CompletableFuture<GuardedToolExecution> ToolGuardrailService.executeGuardrailsAsync(ToolGuardrailService.ToolKey key, ToolExecutionRequest request, GuardrailRequestParams requestParams, Function<ToolExecutionRequest, CompletableFuture<ToolExecutionResult>> tool) Non-blocking counterpart ofToolGuardrailService.executeGuardrails(ToolKey, ToolExecutionRequest, GuardrailRequestParams, Function), with the same rules, for the asynchronous (CompletableFuture) and reactive (Flow.Publisher) AI service modes. -
Uses of GuardedToolExecution in dev.langchain4j.service.tool
Methods in dev.langchain4j.service.tool that return GuardedToolExecutionModifier and TypeMethodDescriptionToolExecutionRound.executeTool(ToolExecutionRequest call, Consumer<BeforeToolExecution> beforeToolExecution, Consumer<ToolExecution> afterToolExecution) Executes a call of the round, blocking: its tool, through the tool guardrails of the tool if it has any, with the callbacks of theToolServiceand the given ones.Methods in dev.langchain4j.service.tool that return types with arguments of type GuardedToolExecutionModifier and TypeMethodDescriptionToolExecutionRound.executeToolAsync(ToolExecutionRequest call, Consumer<BeforeToolExecution> beforeToolExecution, Consumer<ToolExecution> afterToolExecution, Executor executor) Executes a call of the round on a thread ofexecutor, blocking that thread, asToolExecutionRound.executeTool(ToolExecutionRequest, Consumer, Consumer)does.