Table of Contents

Class AggregationResult

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

The aggregation result for a single metric. This data type is not supported in Gemini API.

public record AggregationResult : IEquatable<AggregationResult>
Inheritance
AggregationResult
Implements
Inherited Members

Properties

AggregationMetric

Aggregation metric.

[JsonPropertyName("aggregationMetric")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AggregationMetric? AggregationMetric { get; set; }

Property Value

AggregationMetric?

BleuMetricValue

Results for bleu metric.

[JsonPropertyName("bleuMetricValue")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public BleuMetricValue? BleuMetricValue { get; set; }

Property Value

BleuMetricValue

CustomCodeExecutionResult

Result for code execution metric.

[JsonPropertyName("customCodeExecutionResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public CustomCodeExecutionResult? CustomCodeExecutionResult { get; set; }

Property Value

CustomCodeExecutionResult

ExactMatchMetricValue

Results for exact match metric.

[JsonPropertyName("exactMatchMetricValue")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ExactMatchMetricValue? ExactMatchMetricValue { get; set; }

Property Value

ExactMatchMetricValue

PairwiseMetricResult

Result for pairwise metric.

[JsonPropertyName("pairwiseMetricResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PairwiseMetricResult? PairwiseMetricResult { get; set; }

Property Value

PairwiseMetricResult

PointwiseMetricResult

Result for pointwise metric.

[JsonPropertyName("pointwiseMetricResult")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PointwiseMetricResult? PointwiseMetricResult { get; set; }

Property Value

PointwiseMetricResult

RougeMetricValue

Results for rouge metric.

[JsonPropertyName("rougeMetricValue")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RougeMetricValue? RougeMetricValue { get; set; }

Property Value

RougeMetricValue

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a AggregationResult object.

public static AggregationResult? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

AggregationResult

The deserialized AggregationResult object, or null if deserialization fails.