Package com.google.genai.types
Class ComputationBasedMetricSpec
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ComputationBasedMetricSpec
Specification for a computation based metric.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ComputationBasedMetricSpec. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for ComputationBasedMetricSpec.static ComputationBasedMetricSpecDeserializes a JSON string to a ComputationBasedMetricSpec object.A map of parameters for the metric.abstract ComputationBasedMetricSpec.BuilderCreates a builder with the same values as this instance.abstract Optional<ComputationBasedMetricType>type()The type of the computation based metric.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
ComputationBasedMetricSpec
public ComputationBasedMetricSpec()
-
-
Method Details
-
type
The type of the computation based metric. -
parameters
A map of parameters for the metric. ROUGE example: {"rouge_type": "rougeL", "split_summaries": True, "use_stemmer": True}. BLEU example: {"use_effective_order": True}. -
builder
Instantiates a builder for ComputationBasedMetricSpec. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ComputationBasedMetricSpec object.
-