TomTom Maps for JavaScript
    Preparing search index...

    Variable classifyUserIntentConst

    classifyUserIntent: (
        conversation: ConversationMessage[],
        options: ClassifierOptions,
    ) => Promise<ClassificationResult>

    Classify a user conversation to determine which tools to activate.

    The conversation should contain the last user message plus a compaction of the previous chat history (each truncated to save tokens).

    Type Declaration

    const result = await classifyUserIntent(conversation, {
    chatModel: openai('gpt-4o-mini'),
    toolsMetadata,
    });
    // result.activeToolNames contains the selected tools