| foundry_schema | R Documentation |
Create a strict object schema for structured outputs. All supplied fields are required by default and additional properties are disabled by default, matching the strict schema shape expected by Azure OpenAI structured outputs.
foundry_schema(
...,
required = NULL,
additional_properties = FALSE,
description = NULL
)
... |
Named schema fields, usually created with |
required |
Character vector of required field names. Defaults to all supplied fields. |
additional_properties |
Logical. Whether properties outside |
description |
Character. Optional schema description. |
A JSON Schema represented as an R list.
schema <- foundry_schema(
sentiment = schema_enum(c("positive", "negative", "neutral")),
score = schema_number()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.