ToTOptions
Interface: ToTOptions
Defined in: src/patterns/ToT.ts:26
Properties
beamWidth?
readonlyoptionalbeamWidth?:number
Defined in: src/patterns/ToT.ts:42
Beam width — how many thoughts survive after each level. Default 1 (greedy).
branchingFactor
readonlybranchingFactor:number
Defined in: src/patterns/ToT.ts:34
Branching factor — K thoughts generated per frontier node per iteration.
depth
readonlydepth:number
Defined in: src/patterns/ToT.ts:32
Depth of the tree (number of expansion iterations).
id?
readonlyoptionalid?:string
Defined in: src/patterns/ToT.ts:46
maxTokens?
readonlyoptionalmaxTokens?:number
Defined in: src/patterns/ToT.ts:44
model
readonlymodel:string
Defined in: src/patterns/ToT.ts:28
name?
readonlyoptionalname?:string
Defined in: src/patterns/ToT.ts:45
provider
readonlyprovider:LLMProvider
Defined in: src/patterns/ToT.ts:27
score
readonlyscore: (thought) =>number
Defined in: src/patterns/ToT.ts:40
Scorer: given a thought, return a numeric score. Higher is better.
The top beamWidth thoughts survive each level; the rest are pruned.
Synchronous so pruning is deterministic.
Parameters
thought
string
Returns
number
temperature?
readonlyoptionaltemperature?:number
Defined in: src/patterns/ToT.ts:43
thoughtPrompt
readonlythoughtPrompt:string
Defined in: src/patterns/ToT.ts:30
System prompt for the thought-generation LLMCall.
