GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — TrajectoryThoughtPruningCompactor | ADK for TypeScript: API Reference - v2.5.0

  • TrajectoryThoughtPruningCompactor

Class TrajectoryThoughtPruningCompactor

A context compactor that prunes thought parts from older events in the session history. Preserves the causal history (actions and observations) while reducing token usage.

Implements

  • BaseContextCompactor
  • Defined in core/src/context/trajectory_thought_pruning_compactor.ts:27

Constructors

constructor

  • new TrajectoryThoughtPruningCompactor(
        options: TrajectoryThoughtPruningCompactorOptions,
    ): TrajectoryThoughtPruningCompactor

    Parameters

    • options: TrajectoryThoughtPruningCompactorOptions

    Returns TrajectoryThoughtPruningCompactor

    • Defined in core/src/context/trajectory_thought_pruning_compactor.ts:30

Methods

compact

  • compact(invocationContext: InvocationContext): void | Promise<void>

    Compacts the context in place.

    Parameters

    • invocationContext: InvocationContext

      The current invocation context.

    Returns void | Promise<void>

    Implementation of BaseContextCompactor.compact

    • Defined in core/src/context/trajectory_thought_pruning_compactor.ts:56

shouldCompact

  • shouldCompact(invocationContext: InvocationContext): boolean | Promise<boolean>

    Determines whether the context should be compacted.

    Parameters

    • invocationContext: InvocationContext

      The current invocation context.

    Returns boolean | Promise<boolean>

    A boolean or a promise resolving to a boolean indicating if compaction should occur.

    Implementation of BaseContextCompactor.shouldCompact

    • Defined in core/src/context/trajectory_thought_pruning_compactor.ts:37
Constructors
constructor
Methods
compactshouldCompact
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.