Package dev.dokimos.core.conversation
Class GoldenGenerator.Builder
java.lang.Object
dev.dokimos.core.conversation.GoldenGenerator.Builder
- Enclosing class:
GoldenGenerator
Builder for constructing golden generators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplication(ConversationalApplication application) Sets the application under test, which answers every seed.build()Builds the golden generator.description(String description) Sets the description of the generated dataset.Sets the judge used to build persona-driven users.maxTurns(int maxTurns) Sets the default turn limit for seeds that do not set their own.Sets the name of the generated dataset.seed(ScenarioSeed seed) Adds one seed to generate.seeds(List<ScenarioSeed> seeds) Replaces the seeds to generate.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
application
Sets the application under test, which answers every seed.- Parameters:
application- the application to drive- Returns:
- this builder
-
judge
Sets the judge used to build persona-driven users.Scripted seeds need no judge: their user turns are replayed verbatim. The judge is only requested when a persona-driven seed is generated, and its absence then fails with a message naming the seed.
- Parameters:
judge- the judge- Returns:
- this builder
-
maxTurns
Sets the default turn limit for seeds that do not set their own. Default is 10.A scripted seed stops at its last user turn even when the limit is higher.
- Parameters:
maxTurns- the maximum number of turns- Returns:
- this builder
-
name
Sets the name of the generated dataset. Defaults to"goldens".- Parameters:
name- the dataset name- Returns:
- this builder
-
description
Sets the description of the generated dataset.- Parameters:
description- the dataset description- Returns:
- this builder
-
seed
Adds one seed to generate.- Parameters:
seed- the seed to add- Returns:
- this builder
-
seeds
Replaces the seeds to generate.- Parameters:
seeds- the seeds, in generation order- Returns:
- this builder
-
build
Builds the golden generator.- Returns:
- a new golden generator
- Throws:
IllegalStateException- if the application or the seeds are missing
-