Package com.google.genai.types
Class ComputationBasedMetricSpec
-
- All Implemented Interfaces:
public abstract class ComputationBasedMetricSpec extends JsonSerializable
Specification for a computation based metric.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classComputationBasedMetricSpec.BuilderBuilder for ComputationBasedMetricSpec.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ComputationBasedMetricSpec()
-
Method Summary
Modifier and Type Method Description abstract Optional<ComputationBasedMetricType>type()The type of the computation based metric. abstract Optional<Map<String, Object>>parameters()A map of parameters for the metric. static ComputationBasedMetricSpec.Builderbuilder()Instantiates a builder for ComputationBasedMetricSpec. abstract ComputationBasedMetricSpec.BuildertoBuilder()Creates a builder with the same values as this instance. static ComputationBasedMetricSpecfromJson(String jsonString)Deserializes a JSON string to a ComputationBasedMetricSpec 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
-
type
abstract Optional<ComputationBasedMetricType> type()
The type of the computation based metric.
-
parameters
abstract Optional<Map<String, Object>> 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
static ComputationBasedMetricSpec.Builder builder()
Instantiates a builder for ComputationBasedMetricSpec.
-
toBuilder
abstract ComputationBasedMetricSpec.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ComputationBasedMetricSpec fromJson(String jsonString)
Deserializes a JSON string to a ComputationBasedMetricSpec object.
-
-
-
-