Class ToolExecution
java.lang.Object
dev.langchain4j.service.tool.ToolExecution
Represents the execution of a tool, including the request and the result.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolExecution.Builder
builder()
boolean
boolean
Indicates whether the tool execution result represents an error.int
hashCode()
request()
Returns the request of the tool execution.result()
Returns the tool execution result as text.Returns the tool execution result as object.toString()
-
Method Details
-
request
Returns the request of the tool execution.- Returns:
- the request of the tool execution.
-
result
Returns the tool execution result as text.- Returns:
- the result of the tool execution.
- See Also:
-
resultObject
Returns the tool execution result as object. This object is the actual value returned by the tool.- Returns:
- the result of the tool execution.
- See Also:
-
hasFailed
public boolean hasFailed()Indicates whether the tool execution result represents an error. -
equals
-
hashCode
-
toString
-
builder
-