Class EvaluatorsPluginOptions
java.lang.Object
com.google.genkit.plugins.evaluators.EvaluatorsPluginOptions
Configuration options for the GenkitEval plugin.
Allows configuring the default judge model, embedder, and the list of metrics to enable.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()getJudge()resolveEmbedder(MetricConfig config) Resolves the embedder for a specific metric, falling back to the global default.resolveEmbedderOptions(MetricConfig config) Resolves the embedder options for a specific metric, falling back to the global default.resolveJudge(MetricConfig config) Resolves the judge for a specific metric, falling back to the global default.resolveJudgeConfig(MetricConfig config) Resolves the judge config for a specific metric, falling back to the global default.static EvaluatorsPluginOptionswithMetrics(MetricConfig... metrics) Creates plugin options with the specified metrics using defaults for judge and embedder.static EvaluatorsPluginOptionswithMetricTypes(GenkitMetric... metricTypes) Creates plugin options with simple metric types (no per-metric configuration).
-
Method Details
-
builder
-
withMetrics
Creates plugin options with the specified metrics using defaults for judge and embedder.- Parameters:
metrics- the metrics to enable- Returns:
- plugin options
-
withMetricTypes
Creates plugin options with simple metric types (no per-metric configuration).- Parameters:
metricTypes- the metric types to enable- Returns:
- plugin options
-
getMetrics
-
getJudge
-
getJudgeConfig
-
getEmbedder
-
getEmbedderOptions
-
resolveJudge
Resolves the judge for a specific metric, falling back to the global default.- Parameters:
config- the metric configuration- Returns:
- the resolved judge model name
-
resolveJudgeConfig
Resolves the judge config for a specific metric, falling back to the global default.- Parameters:
config- the metric configuration- Returns:
- the resolved judge configuration
-
resolveEmbedder
Resolves the embedder for a specific metric, falling back to the global default.- Parameters:
config- the metric configuration- Returns:
- the resolved embedder name
-
resolveEmbedderOptions
Resolves the embedder options for a specific metric, falling back to the global default.- Parameters:
config- the metric configuration- Returns:
- the resolved embedder options
-