TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ClassificationResult

    Result returned by classifyUserIntent.

    type ClassificationResult = {
        activeToolNames: string[];
        timeMs: number;
        toolScopes?: Record<string, unknown>;
        usage: { inputTokens: number; outputTokens: number; totalTokens: number };
    }
    Index
    activeToolNames: string[]

    Tool names selected by the classifier.

    timeMs: number

    The wall-clock time in ms of the classification step, excluding the agent response.

    toolScopes?: Record<string, unknown>

    The optional per-tool scope, keyed by tool name. Each value is the raw classifier output for that tool, which prepareStep validates against the tool's scopeSchema before applying any narrowing. Tools without scopeSchema, or with no scope from the classifier, keep their full description and inputSchema for the turn.

    usage: { inputTokens: number; outputTokens: number; totalTokens: number }

    Token usage of the classification, summed over its one LLM call, or two when the first answer fails validation.