TomTom Maps for JavaScript
    Preparing search index...

    Variable classifyUserIntentConst

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

    Classifies a user conversation to pick the tools to activate.

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

    Type Declaration

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