Class OutputGuardrailRequest.Builder
java.lang.Object
dev.langchain4j.guardrail.OutputGuardrailRequest.Builder
- Enclosing class:
OutputGuardrailRequest
Builder for
OutputGuardrailRequest.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newOutputGuardrailRequest.chatExecutor(ChatExecutor chatExecutor) Sets the chat executor.chatRequest(ChatRequest chatRequest) Sets the request that was sent to the model to produce the response.requestParams(GuardrailRequestParams requestParams) Sets the common parameters.responseFromLLM(ChatResponse responseFromLLM) Sets the response from the LLM.
-
Method Details
-
responseFromLLM
Sets the response from the LLM.- Parameters:
responseFromLLM- the response from the LLM- Returns:
- this builder
-
chatExecutor
Sets the chat executor.- Parameters:
chatExecutor- the chat executor- Returns:
- this builder
-
requestParams
Sets the common parameters.- Parameters:
requestParams- the common parameters- Returns:
- this builder
-
chatRequest
Sets the request that was sent to the model to produce the response.- Parameters:
chatRequest- the request, ornullif it is not known- Returns:
- this builder
- Since:
- 1.23.0
-
build
Builds a newOutputGuardrailRequest.- Returns:
- a new
OutputGuardrailRequest
-