Skip to content

OutputStrategies

Namespace: Vercel.AI.GenerateText

public static class OutputStrategies

Array output schema wrapping. Maps to the array branch of getOutputStrategy.

Inheritance: object

View source

public static JsonElement WrapArrayOutputSchema(JsonElement elementSchema)

Wraps an element schema in { elements: array } and lifts root definitions or $defs so root-relative references stay valid.

Parameters

Name Type Description
elementSchema JsonElement

Returns: JsonElement

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product