Package com.google.genai.types
Class PointwiseMetricSpec
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.PointwiseMetricSpec
Spec for pointwise metric.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for PointwiseMetricSpec. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PointwiseMetricSpec.Builderbuilder()Instantiates a builder for PointwiseMetricSpec.abstract Optional<CustomOutputFormatConfig>Optional.static PointwiseMetricSpecDeserializes a JSON string to a PointwiseMetricSpec object.Required.Optional.abstract PointwiseMetricSpec.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
PointwiseMetricSpec
public PointwiseMetricSpec()
-
-
Method Details
-
metricPromptTemplate
Required. Metric prompt template for pointwise metric. -
customOutputFormatConfig
Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty. -
systemInstruction
Optional. System instructions for pointwise metric. -
builder
Instantiates a builder for PointwiseMetricSpec. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a PointwiseMetricSpec object.
-