Class ToolInputGuardrailRequest.Builder
java.lang.Object
dev.langchain4j.guardrail.ToolInputGuardrailRequest.Builder
- Enclosing class:
ToolInputGuardrailRequest
Builder for
ToolInputGuardrailRequest.- Since:
- 1.25.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the request.requestParams(GuardrailRequestParams requestParams) Sets the parameters of the AI service invocation, required.toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) Sets the tool execution request, required.toolSource(ToolSource toolSource) Sets where the tool comes from.toolSpecification(ToolSpecification toolSpecification) Sets the specification of the tool.
-
Method Details
-
toolExecutionRequest
public ToolInputGuardrailRequest.Builder toolExecutionRequest(ToolExecutionRequest toolExecutionRequest) Sets the tool execution request, required.- Parameters:
toolExecutionRequest- the tool execution request- Returns:
- this builder
-
toolSpecification
Sets the specification of the tool. Required.- Parameters:
toolSpecification- the tool specification- Returns:
- this builder
-
toolSource
Sets where the tool comes from. Required: guardrails can trust a tool, or not, by its source, so it has no default.- Parameters:
toolSource- the tool source- Returns:
- this builder
-
requestParams
Sets the parameters of the AI service invocation, required.- Parameters:
requestParams- the request params- Returns:
- this builder
-
build
-