powered by
Create a JSON Schema for object type. This is the primary schema builder for defining tool parameters.
z_object( ..., .description = NULL, .required = NULL, .additional_properties = FALSE )
A list representing JSON Schema for object.
Named arguments where names are property names and values are z_schema objects created by z_* functions.
Optional description of the object.
Character vector of required field names. If NULL (default), all fields are considered required.
Whether to allow additional properties. Default FALSE.
z_object( location = z_string(description = "City name, e.g., Beijing"), unit = z_enum(c("celsius", "fahrenheit"), description = "Temperature unit") )
Run the code above in your browser using DataLab