Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.81 KB

vertexai.counttokensresponse.md

File metadata and controls

57 lines (39 loc) · 1.81 KB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

CountTokensResponse interface

Response from calling GenerativeModel.countTokens().

Signature:

export interface CountTokensResponse 

Properties

Property Type Description
promptTokensDetails ModalityTokenCount[] The breakdown, by modality, of how many tokens are consumed by the prompt.
totalBillableCharacters number The total number of billable characters counted across all instances from the request.
totalTokens number The total number of tokens counted across all instances from the request.

CountTokensResponse.promptTokensDetails

The breakdown, by modality, of how many tokens are consumed by the prompt.

Signature:

promptTokensDetails?: ModalityTokenCount[];

CountTokensResponse.totalBillableCharacters

The total number of billable characters counted across all instances from the request.

Signature:

totalBillableCharacters?: number;

CountTokensResponse.totalTokens

The total number of tokens counted across all instances from the request.

Signature:

totalTokens: number;