Member Junction
    Preparing search index...

    Function MapRealtimeUsageModalityDetail

    • The per-modality token counts of one OpenAI-protocol usage block, in the Core RealtimeUsageModalityDetail shape (TextTokens, AudioTokens, ImageTokens, CachedTokens, and CachedAudioTokens from cached_tokens_details.audio_tokens). AudioTokens keeps the provider's figure, cached audio included, so AudioTokens less CachedAudioTokens is the uncached audio pricing charges at the audio rate. Only fields the provider sent as finite numbers of at least 0 are kept. undefined when the block is absent, not an object, or holds none of those fields (a totals-only payload).

      Shared by the server-side OpenAI drivers and the browser OpenAI-protocol clients, so both sides record the same split.

      Parameters

      • detail: unknown

        The input_token_details or output_token_details value from the wire.

      Returns RealtimeUsageModalityDetail