Define output schema for LLM responses
schema.RdDefine output schema for LLM responses
Arguments
- name
Optional Character: The name of the schema.
- ...
Field objects defining the schema fields. Create using field.
- description
Optional Character: A brief description of the schema.
Examples
schema(
"LabSchema",
field("Lab name"),
field("normal range low", type = "number"),
field("normal range high", type = "number")
)
#> LabSchema:
#> description: NULL
#> fields:
#> Lab name:
#> type: string
#> description: Lab name
#> required: TRUE
#> normal range low:
#> type: number
#> description: normal range low
#> required: TRUE
#> normal range high:
#> type: number
#> description: normal range high
#> required: TRUE
#>