Class ToolExecutionResult

java.lang.Object
dev.langchain4j.service.tool.ToolExecutionResult

public class ToolExecutionResult extends Object
Represents the result of a tool execution.
Since:
1.6.0
  • Constructor Details

  • Method Details

    • isError

      public boolean isError()
      Indicates whether the tool execution result represents an error.
    • result

      public Object result()
      Returns the tool execution result as object. This object is the actual value returned by the tool.
      See Also:
    • resultText

      public String resultText()
      Returns the tool execution result as text. It is a result() that is serialized into JSON string.
      See Also:
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static ToolExecutionResult.Builder builder()