Skip to content

DecisionInput

Namespace: Vercel.AI.Operations

public sealed class DecisionInput

Content for decision instructions and criteria descriptions: a string, a JSON object, or a JSON array. Maps to DecisionModelV4Input.

Inheritance: object

View source

public JsonElement Value { get; }

The JSON value. It is a string, an object, or an array.

Value: JsonElement

View source

public static DecisionInput From(string text)

Creates an input from a string.

Parameters

Name Type Description
text string

Returns: DecisionInput

View source

public static DecisionInput FromJson(JsonElement value)

Creates an input from a JSON string, object, or array. Other JSON values throw InvalidArgumentException.

Parameters

Name Type Description
value JsonElement

Returns: DecisionInput

View source

public static DecisionInput Parse(string json)

Parses JSON text into an input. The text must be a JSON string, object, or array.

Parameters

Name Type Description
json string

Returns: DecisionInput

View source

public override string ToString()

The string itself, or the JSON text of an object or array.

Returns: string

View source

public static implicit operator DecisionInput(string text)

Converts a string to an input.

Parameters

Name Type Description
text string

Returns: DecisionInput

View source

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