Skip to content

OutputSpec

Namespace: Vercel.AI

public abstract class OutputSpec

Structured output selector. Maps to Output.

Inheritance: object

View source

public static OutputSpec Object(string jsonSchema, string? name = null, string? description = null)

JSON object output validated against a schema string.

Parameters

Name Type Description
jsonSchema string
name string
description string

Returns: OutputSpec

View source

public static OutputSpec Object(JsonElement schema, string? name = null, string? description = null)

JSON object output validated against <code class=“paramref”>schema</code>.

Parameters

Name Type Description
schema JsonElement
name string
description string

Returns: OutputSpec

View source

public static OutputSpec Text()

Plain text output.

Returns: OutputSpec

View source

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