Package com.tnsai.reasoning
Class TreeOfThoughtsExecutor.Builder
java.lang.Object
com.tnsai.reasoning.TreeOfThoughtsExecutor.Builder
- Enclosing class:
TreeOfThoughtsExecutor
Builder for TreeOfThoughtsExecutor.
-
Method Summary
Modifier and TypeMethodDescriptionbeamWidth(int beamWidth) Sets the beam width for beam search (default: 3).branchingFactor(int branchingFactor) Sets the number of candidate thoughts to generate (default: 3).build()Builds the TreeOfThoughtsExecutor.evaluator(BranchEvaluator evaluator) Sets the branch evaluator.llm(com.tnsai.llm.LLMClient llm) Sets the LLM client for thought generation.maxDepth(int maxDepth) Sets the maximum exploration depth (default: 5).pruneThreshold(double threshold) Sets the score threshold for pruning (default: 0.3).pruning(PruningStrategy pruning) Sets the pruning strategy (default: BEAM_SEARCH).Sets the exploration timeout (default: 10 minutes).
-
Method Details
-
llm
Sets the LLM client for thought generation. -
evaluator
Sets the branch evaluator. -
pruning
Sets the pruning strategy (default: BEAM_SEARCH). -
beamWidth
Sets the beam width for beam search (default: 3). -
maxDepth
Sets the maximum exploration depth (default: 5). -
branchingFactor
Sets the number of candidate thoughts to generate (default: 3). -
pruneThreshold
Sets the score threshold for pruning (default: 0.3). -
timeout
Sets the exploration timeout (default: 10 minutes). -
build
Builds the TreeOfThoughtsExecutor.
-