Skip to content

LanguageModelV4GenerateResult

Namespace: E2E.Decision.Sdk

public sealed class LanguageModelV4GenerateResult

The AI SDK’s LanguageModelV4GenerateResult (language-model-v4-generate-result.ts) of the Gateway. The Gateway passes the response through z.any(), so Content, FinishReason, Usage, and ProviderMetadata are the JSON the Gateway sent, unvalidated, and any other member of the response is in AdditionalProperties.

Inheritance: object

View source

public IReadOnlyDictionary<string, JsonElement> AdditionalProperties { get; init; }

The members of the Gateway’s response that are not named above, such as id, created, and model.

Value: IReadOnlyDictionary<string, JsonElement>

public JsonElement? Content { get; init; }

The ordered content that the model generated, as the Gateway sent it.

Value: JsonElement?

public JsonElement? FinishReason { get; init; }

The finish reason, as the Gateway sent it.

Value: JsonElement?

public JsonElement? ProviderMetadata { get; init; }

Additional provider-specific metadata, as the Gateway sent it.

Value: JsonElement?

public LanguageModelV4RequestMetadata? Request { get; init; }

The request information, for telemetry and debugging.

Value: LanguageModelV4RequestMetadata

public LanguageModelV4ResponseMetadata? Response { get; init; }

The response information, for telemetry and debugging.

Value: LanguageModelV4ResponseMetadata

public string? StructuredOutputText { get; init; }

The text to parse for structured JSON output when it differs from the concatenation of the text parts of the content.

Value: string

public JsonElement? Usage { get; init; }

The usage information, as the Gateway sent it.

Value: JsonElement?

public required IReadOnlyList<SharedV4Warning> Warnings { get; init; }

The warnings for the call, for example unsupported settings: the Gateway’s, then the model’s own.

Value: IReadOnlyList<SharedV4Warning>