Bluestep JS Documentation
    Preparing search index...

    Interface AiAutoCompactOptions

    When to shorten a conversation that is filling the context window, and how much to keep.

    interface AiAutoCompactOptions {
        atRatio?: number;
        keepLastTurns?: number;
    }
    Index
    atRatio?: number

    How full the context window has to get before the conversation is compacted, as a fraction between 0 and 1. Defaults to 0.8.

    Measured against the model's window, which has to be known: a model whose window neither the provider nor the catalog reports is never auto-compacted, because there is nothing to take a fraction of.

    keepLastTurns?: number

    How many trailing turns to keep intact when compacting. Defaults to 2. The first turn is always kept as well — it is where the task was set.