Functions

tot

Function: tot()

tot(opts): Runner<{ message: string; }, string>

Defined in: src/patterns/ToT.ts:57

Build a ToT Runner. At run time:

  1. Seed — treat the input message as the initial frontier of 1 thought.
  2. For each of depth iterations: a. Parallel fan-out: generate branchingFactor new thoughts. b. Score all new thoughts, keep top beamWidth, pass to next iteration.
  3. Return the single best-scoring thought from the final frontier.

Parameters

opts

ToTOptions

Returns

Runner<{ message: string; }, string>

On this page