type_boolean(), type_enum(), type_number(), and type_string() are
deprecated because they mask ellmer's functions of the same names when both
packages are attached. Use schema_boolean(), schema_enum(),
schema_number(), and schema_string() instead; they take the description
as description. If you already describe fields with ellmer::type_*(),
pass the ellmer type object to as_foundry_schema().
Usage
type_boolean(desc = NULL)
type_enum(desc = NULL, values)
type_number(desc = NULL)
type_string(desc = NULL)Examples
# Use the schema_*() helpers instead:
schema_boolean(description = "Whether AI could materially assist the task")
#> $type
#> [1] "boolean"
#>
#> $description
#> [1] "Whether AI could materially assist the task"
#>
schema_enum(c("low", "medium", "high"), description = "Priority label")
#> $type
#> [1] "string"
#>
#> $description
#> [1] "Priority label"
#>
#> $enum
#> [1] "low" "medium" "high"
#>