Package com.google.genai.types
Class UnifiedMetric
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.UnifiedMetric
The unified metric used for evaluation.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbleuSpec()The Bleu metric spec.static UnifiedMetric.Builderbuilder()Instantiates a builder for UnifiedMetric.abstract Optional<ComputationBasedMetricSpec>The spec for a computation based metric.abstract Optional<CustomCodeExecutionSpec>The spec for a custom code execution metric.static UnifiedMetricDeserializes a JSON string to a UnifiedMetric object.abstract Optional<LLMBasedMetricSpec>The spec for an LLM based metric.abstract Optional<PointwiseMetricSpec>The pointwise metric spec.abstract Optional<PredefinedMetricSpec>The spec for a pre-defined metric.The rouge metric spec.abstract UnifiedMetric.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
UnifiedMetric
public UnifiedMetric()
-
-
Method Details
-
bleuSpec
The Bleu metric spec. -
rougeSpec
The rouge metric spec. -
pointwiseMetricSpec
The pointwise metric spec. -
llmBasedMetricSpec
The spec for an LLM based metric. -
customCodeExecutionSpec
The spec for a custom code execution metric. -
predefinedMetricSpec
The spec for a pre-defined metric. -
computationBasedMetricSpec
The spec for a computation based metric. -
builder
Instantiates a builder for UnifiedMetric. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a UnifiedMetric object.
-