Package com.google.genai.types
Class UnifiedMetric
-
- All Implemented Interfaces:
public abstract class UnifiedMetric extends JsonSerializable
The unified metric used for evaluation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classUnifiedMetric.BuilderBuilder for UnifiedMetric.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description UnifiedMetric()
-
Method Summary
Modifier and Type Method Description abstract Optional<BleuSpec>bleuSpec()The Bleu metric spec. abstract Optional<RougeSpec>rougeSpec()The rouge metric spec. abstract Optional<PointwiseMetricSpec>pointwiseMetricSpec()The pointwise metric spec. abstract Optional<LLMBasedMetricSpec>llmBasedMetricSpec()The spec for an LLM based metric. abstract Optional<CustomCodeExecutionSpec>customCodeExecutionSpec()The spec for a custom code execution metric. abstract Optional<PredefinedMetricSpec>predefinedMetricSpec()The spec for a pre-defined metric. abstract Optional<ComputationBasedMetricSpec>computationBasedMetricSpec()The spec for a computation based metric. static UnifiedMetric.Builderbuilder()Instantiates a builder for UnifiedMetric. abstract UnifiedMetric.BuildertoBuilder()Creates a builder with the same values as this instance. static UnifiedMetricfromJson(String jsonString)Deserializes a JSON string to a UnifiedMetric object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
pointwiseMetricSpec
abstract Optional<PointwiseMetricSpec> pointwiseMetricSpec()
The pointwise metric spec.
-
llmBasedMetricSpec
abstract Optional<LLMBasedMetricSpec> llmBasedMetricSpec()
The spec for an LLM based metric.
-
customCodeExecutionSpec
abstract Optional<CustomCodeExecutionSpec> customCodeExecutionSpec()
The spec for a custom code execution metric.
-
predefinedMetricSpec
abstract Optional<PredefinedMetricSpec> predefinedMetricSpec()
The spec for a pre-defined metric.
-
computationBasedMetricSpec
abstract Optional<ComputationBasedMetricSpec> computationBasedMetricSpec()
The spec for a computation based metric.
-
builder
static UnifiedMetric.Builder builder()
Instantiates a builder for UnifiedMetric.
-
toBuilder
abstract UnifiedMetric.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static UnifiedMetric fromJson(String jsonString)
Deserializes a JSON string to a UnifiedMetric object.
-
-
-
-