Class PredefinedMetricSpec

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.PredefinedMetricSpec

public abstract class PredefinedMetricSpec extends JsonSerializable
The spec for a pre-defined metric. This data type is not supported in Gemini API.
  • Constructor Details

    • PredefinedMetricSpec

      public PredefinedMetricSpec()
  • Method Details

    • metricSpecName

      public abstract Optional<String> metricSpecName()
      Required. The name of a pre-defined metric, such as "instruction_following_v1" or "text_quality_v1".
    • metricSpecParameters

      public abstract Optional<Map<String,Object>> metricSpecParameters()
      Optional. The parameters needed to run the pre-defined metric.
    • builder

      public static PredefinedMetricSpec.Builder builder()
      Instantiates a builder for PredefinedMetricSpec.
    • toBuilder

      public abstract PredefinedMetricSpec.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static PredefinedMetricSpec fromJson(String jsonString)
      Deserializes a JSON string to a PredefinedMetricSpec object.