OutputSpec
Namespace: Vercel.AI
public abstract class OutputSpecStructured output selector. Maps to Output.
Inheritance: object
Methods
Section titled “Methods”Object(string, string?, string?)
Section titled “Object(string, string?, string?)”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
Object(JsonElement, string?, string?)
Section titled “Object(JsonElement, string?, string?)”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
Text()
Section titled “Text()”public static OutputSpec Text()Plain text output.
Returns: OutputSpec
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product