Package com.google.genai.types
Class Metric
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.Metric
The 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 TypeMethodDescriptionstatic Metric.Builderbuilder()Instantiates a builder for Metric.static MetricDeserializes a JSON string to a Metric object.The system instruction for the judge model.name()The name of the metric.The prompt template for the metric.Whether to return the raw output from the judge model.abstract Metric.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
setMaxReadLength, stringToJsonNode, toJson
-
Constructor Details
-
Metric
public Metric()
-
-
Method Details
-
name
The name of the metric. -
promptTemplate
The prompt template for the metric. -
judgeModelSystemInstruction
The system instruction for the judge model. -
returnRawOutput
Whether to return the raw output from the judge model. -
builder
Instantiates a builder for Metric. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a Metric object.
-