Package com.google.genai.types
Class CountTokensParameters
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CountTokensParameters
Parameters for counting tokens.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for CountTokensParameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for CountTokensParameters.abstract Optional<CountTokensConfig>config()Configuration for counting tokens.contents()Input content.static CountTokensParametersDeserializes a JSON string to a CountTokensParameters object.model()ID of the model to use.abstract CountTokensParameters.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
CountTokensParameters
public CountTokensParameters()
-
-
Method Details
-
model
ID of the model to use. For a list of models, see `Google models <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. -
contents
Input content. -
config
Configuration for counting tokens. -
builder
Instantiates a builder for CountTokensParameters. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a CountTokensParameters object.
-