Skip to contents

Parse a YAML file defining a schema into an ellmer type object structure.

Usage

parse_yaml_to_ellmer_schema(yaml_path)

Arguments

yaml_path

Path to the YAML file containing the schema definition.

Value

An ellmer type object (e.g., type_object, type_array) representing the schema.

Examples

if (FALSE) { # \dontrun{
# Assuming 'schema.yaml' exists and contains the schema definition
ellmer_schema <- parse_yaml_to_ellmer_schema("schema.yaml")

# You can then use this schema with ellmer::extract_data
# chat <- ellmer::chat_openai()
# extracted_data <- chat$extract_data(paper_text, type = ellmer_schema)
} # }