Class ToolParameters

java.lang.Object
dev.langchain4j.agent.tool.ToolParameters

@Deprecated(forRemoval=true) public class ToolParameters extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
please use the new JsonObjectSchema API instead to define the schema for tool parameters. Example:
 ToolSpecification.builder()
     .name("weather")
     .description("Returns the current weather in the specified city")
     .parameters(JsonObjectSchema.builder()
         .addStringProperty("city", "The name of the city, e.g., Munich")
         .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT"))
         .required("city") // please specify mandatory properties explicitly
         .build())
     .build();
 
Represents the parameters of a tool.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    ToolParameters builder static inner class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    please use JsonObjectSchema.builder() instead
    boolean
    equals(Object another)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the properties of the tool.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the required properties of the tool.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the type of the tool.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • type

      public String type()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the type of the tool.
      Returns:
      the type of the tool.
    • properties

      public Map<String,Map<String,Object>> properties()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the properties of the tool.
      Returns:
      the properties of the tool.
    • required

      public List<String> required()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the required properties of the tool.
      Returns:
      the required properties of the tool.
    • equals

      public boolean equals(Object another)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • builder

      @Deprecated(forRemoval=true) public static ToolParameters.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonObjectSchema.builder() instead
      ToolParameters builder static inner class.
      Returns:
      a ToolParameters.Builder.