| schema_constructors | R Documentation |
Build JSON Schema field definitions for use with foundry_schema() or raw
schema lists passed to foundry_extract() and foundry_response().
schema_string(description = NULL, enum = NULL)
schema_enum(values, description = NULL)
schema_number(description = NULL)
schema_integer(description = NULL)
schema_boolean(description = NULL)
schema_array(items, description = NULL, min_items = NULL, max_items = NULL)
schema_object(
...,
required = NULL,
additional_properties = FALSE,
description = NULL
)
description |
Character. Optional field description. |
enum |
Character vector of allowed values. |
values |
Character vector of allowed values for |
items |
List. Item schema for |
min_items, max_items |
Integer. Optional array length bounds. |
... |
Named child fields for |
required |
Character vector of required child fields. Defaults to all supplied fields. |
additional_properties |
Logical. Whether undeclared object properties are allowed. |
A JSON Schema fragment represented as an R list.
schema_string("Free-text label")
schema_enum(c("positive", "negative", "neutral"))
schema_object(
sentiment = schema_enum(c("positive", "negative", "neutral")),
confidence = schema_number()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.