Package com.tnsai.reasoning
Class SelfConsistencyExecutor.Builder
java.lang.Object
com.tnsai.reasoning.SelfConsistencyExecutor.Builder
- Enclosing class:
SelfConsistencyExecutor
Builder for SelfConsistencyExecutor.
-
Method Summary
Modifier and TypeMethodDescriptionaggregation(Aggregation aggregation) Sets the aggregation strategy (default: MAJORITY_VOTE).baseTemperature(double temperature) Sets the base temperature for sampling (default: 0.7).build()Builds the SelfConsistencyExecutor.llm(com.tnsai.llm.LLMClient llm) Sets the LLM client to use for reasoning.maxConcurrency(int maxConcurrency) Sets maximum concurrency for parallel execution (default: 5).numPaths(int numPaths) Sets the number of reasoning paths to generate (default: 5).parallel(boolean parallel) Enables or disables parallel execution (default: true).systemPrompt(String systemPrompt) Sets an optional system prompt.temperatureVariance(double variance) Sets the temperature variance between paths (default: 0.1).Sets timeout for parallel execution (default: 5 minutes).
-
Method Details
-
llm
Sets the LLM client to use for reasoning. -
numPaths
Sets the number of reasoning paths to generate (default: 5). -
aggregation
Sets the aggregation strategy (default: MAJORITY_VOTE). -
baseTemperature
Sets the base temperature for sampling (default: 0.7). -
temperatureVariance
Sets the temperature variance between paths (default: 0.1). -
systemPrompt
Sets an optional system prompt. -
parallel
Enables or disables parallel execution (default: true). -
maxConcurrency
Sets maximum concurrency for parallel execution (default: 5). -
timeout
Sets timeout for parallel execution (default: 5 minutes). -
build
Builds the SelfConsistencyExecutor.
-