This is the documentation of version 0.47.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Variable extractLastUserTextConst

    extractLastUserText: (messages: ReadonlyArray<ModelMessage>) => string | null

    Extracts the text content of the last user message in a message array. Returns null if no user message is found or if content has no text.

    Type Declaration

      • (messages: ReadonlyArray<ModelMessage>): string | null
      • Parameters

        • messages: ReadonlyArray<ModelMessage>

        Returns string | null