IGenerativeModelCountTokensAsync(GenerateContentRequest) Method
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
Task<CountTokensResponse> CountTokensAsync(
GenerateContentRequest generateContentRequest
)
- generateContentRequest GenerateContentRequest
- An instance of GenerateContentRequest containing the input data for which the token count is calculated.
TaskCountTokensResponseA task that represents the asynchronous operation, containing a
CountTokensResponse with token count details.