ModalityTokenCount

public final classModalityTokenCount


Represents token counting info for a single modality.

Summary

Public fields

final @NonNullContentModality

The modality associated with this token count.

final int

The number of tokens counted.

Public methods

final @NonNullContentModality
final int

Public fields

modality

public final @NonNullContentModality modality

The modality associated with this token count.

tokenCount

public final int tokenCount

The number of tokens counted.

Public methods

component1

public final @NonNullContentModality component1()

component2

public final int component2()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.