DecisionInput
Namespace: Vercel.AI.Operations
public sealed class DecisionInputContent for decision instructions and criteria descriptions: a string, a JSON object, or a JSON array.
Maps to DecisionModelV4Input.
Inheritance: object
Properties
Section titled “Properties”public JsonElement Value { get; }The JSON value. It is a string, an object, or an array.
Value: JsonElement
Methods
Section titled “Methods”From(string)
Section titled “From(string)”public static DecisionInput From(string text)Creates an input from a string.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: DecisionInput
FromJson(JsonElement)
Section titled “FromJson(JsonElement)”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
Parse(string)
Section titled “Parse(string)”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
ToString()
Section titled “ToString()”public override string ToString()The string itself, or the JSON text of an object or array.
Returns: string
Operators
Section titled “Operators”implicit operator DecisionInput(string)
Section titled “implicit operator DecisionInput(string)”public static implicit operator DecisionInput(string text)Converts a string to an input.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
Returns: DecisionInput
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product