Class JsonSchemaProperty

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

@Deprecated(forRemoval=true) public class JsonSchemaProperty extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
please use the new JsonSchemaElement API instead to define the schema for tool parameters
Represents a property in a JSON schema.
  • Field Details

  • Constructor Details

    • JsonSchemaProperty

      @Deprecated(forRemoval=true) public JsonSchemaProperty(String key, Object value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use the new JsonSchemaElement API instead to define the schema for tool parameters
      Construct a property with key and value.
      Parameters:
      key - the key.
      value - the value.
  • Method Details

    • key

      public String key()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the key.
      Returns:
      the key.
    • value

      public Object value()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the value.
      Returns:
      the value.
    • 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
    • from

      @Deprecated(forRemoval=true) public static JsonSchemaProperty from(String key, Object value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use the new JsonSchemaElement API instead to define the schema for tool parameters
      Construct a property with key and value.

      Equivalent to new JsonSchemaProperty(key, value).

      Parameters:
      key - the key.
      value - the value.
      Returns:
      a property with key and value.
    • property

      @Deprecated(forRemoval=true) public static JsonSchemaProperty property(String key, Object value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use the new JsonSchemaElement API instead to define the schema for tool parameters
      Construct a property with key and value.

      Equivalent to new JsonSchemaProperty(key, value).

      Parameters:
      key - the key.
      value - the value.
      Returns:
      a property with key and value.
    • type

      @Deprecated(forRemoval=true) public static JsonSchemaProperty type(String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use the new JsonSchemaElement API instead to define the schema for tool parameters
      Construct a property with key "type" and value.

      Equivalent to new JsonSchemaProperty("type", value).

      Parameters:
      value - the value.
      Returns:
      a property with key and value.
    • description

      @Deprecated(forRemoval=true) public static JsonSchemaProperty description(String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use the new JsonSchemaElement API instead to define the schema for tool parameters
      Construct a property with key "description" and value.

      Equivalent to new JsonSchemaProperty("description", value).

      Parameters:
      value - the value.
      Returns:
      a property with key and value.
    • enums

      @Deprecated(forRemoval=true) public static JsonSchemaProperty enums(String... enumValues)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonEnumSchema instead
      Construct a property with key "enum" and value enumValues.
      Parameters:
      enumValues - enum values as strings. For example: enums("CELSIUS", "FAHRENHEIT")
      Returns:
      a property with key "enum" and value enumValues
    • enums

      @Deprecated(forRemoval=true) public static JsonSchemaProperty enums(Object... enumValues)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonEnumSchema instead
      Construct a property with key "enum" and value enumValues.

      Verifies that each value is a java class.

      Parameters:
      enumValues - enum values. For example: enums(TemperatureUnit.CELSIUS, TemperatureUnit.FAHRENHEIT)
      Returns:
      a property with key "enum" and value enumValues
    • enums

      @Deprecated(forRemoval=true) public static JsonSchemaProperty enums(Class<?> enumClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonEnumSchema instead
      Construct a property with key "enum" and all enum values taken from enumClass.
      Parameters:
      enumClass - enum class. For example: enums(TemperatureUnit.class)
      Returns:
      a property with key "enum" and values taken from enumClass
    • items

      @Deprecated(forRemoval=true) public static JsonSchemaProperty items(JsonSchemaProperty type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonArraySchema instead
      Wraps the given type in a property with key "items".
      Parameters:
      type - the type
      Returns:
      a property with key "items" and value type.
    • objectItems

      @Deprecated(forRemoval=true) public static JsonSchemaProperty objectItems(JsonSchemaProperty type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      please use JsonObjectSchema instead