Class ToolExecutionResult.Builder
java.lang.Object
dev.langchain4j.service.tool.ToolExecutionResult.Builder
- Enclosing class:
ToolExecutionResult
- Since:
- 1.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()isError(boolean isError) resultText(String resultText) resultTextSupplier(Supplier<String> resultTextSupplier) Sets a supplier for lazy calculation of the result text.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
isError
-
result
-
resultText
-
resultTextSupplier
Sets a supplier for lazy calculation of the result text. The supplier will be called only whenToolExecutionResult.resultText()is first accessed.- Parameters:
resultTextSupplier- the supplier to calculate result text on demand- Returns:
- this builder
- Since:
- 1.9.0
-
build
-