Skip to content

DecisionInput

Namespace: E2E.Decision.Sdk

public sealed class DecisionInput

An instruction or a criterion description (the AI SDK’s DecisionModelV4Input): text, or a JSON value the provider serializes into the prompt. A string converts implicitly.

Inheritance: object

View source

public JsonElement? Json { get; }

The value, when the input is JSON.

Value: JsonElement?

public static DecisionInput Null { get; }

An explicit JSON null, as upstream’s instructions: null or criteria: { false: null } reads. A C# null leaves the field out. .NET-only: JavaScript tells an absent field from a null one, C# needs a value for the second.

Value: DecisionInput

public string? Text { get; }

The text, when the input is a string.

Value: string

public static DecisionInput FromJson(JsonElement value)

A structured (object, array, number, boolean, or null) input.

Parameters

Name Type Description
value JsonElement

Returns: DecisionInput

public override string ToString()

Returns a string that represents the current object.

Returns: string — A string that represents the current object.

public string ToText()

The text a provider puts in its prompt: a string as is, JSON compact (JSON.stringify).

Returns: string

public static implicit operator DecisionInput?(string? text)

Converts a string to an input; null stays null.

Parameters

Name Type Description
text string

Returns: DecisionInput