Skip to content

Latest commit

 

History

History
68 lines (41 loc) · 1.25 KB

CountTextTokensRequest.md

File metadata and controls

68 lines (41 loc) · 1.25 KB

google.generativeai.protos.CountTextTokensRequest

View source on GitHub

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

Attributes

model

str

Required. The model's resource name. This serves as an ID for the Model to use.

This name should match a model name returned by the ListModels method.

Format: models/{model}

prompt

google.ai.generativelanguage.TextPrompt

Required. The free-form input text given to the model as a prompt.