Package com.google.genai.types
Class PredefinedMetricSpec
-
- All Implemented Interfaces:
public abstract class PredefinedMetricSpec extends JsonSerializable
The spec for a pre-defined metric. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classPredefinedMetricSpec.BuilderBuilder for PredefinedMetricSpec.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description PredefinedMetricSpec()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>metricSpecName()Required. abstract Optional<Map<String, Object>>metricSpecParameters()Optional. static PredefinedMetricSpec.Builderbuilder()Instantiates a builder for PredefinedMetricSpec. abstract PredefinedMetricSpec.BuildertoBuilder()Creates a builder with the same values as this instance. static PredefinedMetricSpecfromJson(String jsonString)Deserializes a JSON string to a PredefinedMetricSpec 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
-
metricSpecName
abstract Optional<String> metricSpecName()
Required. The name of a pre-defined metric, such as "instruction_following_v1" or "text_quality_v1".
-
metricSpecParameters
abstract Optional<Map<String, Object>> metricSpecParameters()
Optional. The parameters needed to run the pre-defined metric.
-
builder
static PredefinedMetricSpec.Builder builder()
Instantiates a builder for PredefinedMetricSpec.
-
toBuilder
abstract PredefinedMetricSpec.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static PredefinedMetricSpec fromJson(String jsonString)
Deserializes a JSON string to a PredefinedMetricSpec object.
-
-
-
-