Uses of Interface
dev.langchain4j.service.guardrail.ToolGuardrailService.ToolKey
Packages that use ToolGuardrailService.ToolKey
-
Uses of ToolGuardrailService.ToolKey in dev.langchain4j.service.guardrail
Methods in dev.langchain4j.service.guardrail that return ToolGuardrailService.ToolKeyModifier and TypeMethodDescriptionToolGuardrailService.bind(AiServiceTool tool) Binds a tool to this service: resolves the tool guardrails that apply to the tool, and returns the key to run them with.Methods in dev.langchain4j.service.guardrail with parameters of type ToolGuardrailService.ToolKeyModifier and TypeMethodDescriptiondefault 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.default 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.ToolGuardrailService.executeInputGuardrails(ToolGuardrailService.ToolKey key, ToolInputGuardrailRequest request) Executes the input guardrails of the tool.ToolGuardrailService.executeInputGuardrailsAsync(ToolGuardrailService.ToolKey key, ToolInputGuardrailRequest request) Non-blocking counterpart ofToolGuardrailService.executeInputGuardrails(ToolKey, ToolInputGuardrailRequest): nothing is thrown, a fatal failure, an invalid key or a request that does not match the key fails the returned future.ToolGuardrailService.executeOutputGuardrails(ToolGuardrailService.ToolKey key, ToolOutputGuardrailRequest request) Executes the output guardrails of the tool.ToolGuardrailService.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.booleanToolGuardrailService.hasInputGuardrails(ToolGuardrailService.ToolKey key) Whether the tool has input guardrails.booleanToolGuardrailService.hasOutputGuardrails(ToolGuardrailService.ToolKey key) Whether the tool has output guardrails. -
Uses of ToolGuardrailService.ToolKey in dev.langchain4j.service.tool
Methods in dev.langchain4j.service.tool that return types with arguments of type ToolGuardrailService.ToolKeyModifier and TypeMethodDescriptionToolServiceContext.toolGuardrailKeys()Returns the key thatToolGuardrailService.bind(AiServiceTool)of the tool guardrail service returned for each tool, by tool name.Method parameters in dev.langchain4j.service.tool with type arguments of type ToolGuardrailService.ToolKeyModifier and TypeMethodDescriptionToolServiceContext.Builder.toolGuardrailKeys(Map<String, ToolGuardrailService.ToolKey> toolGuardrailKeys) Sets the key thatToolGuardrailService.bind(AiServiceTool)of the tool guardrail service returned for each tool, by tool name.