docs-devsite/ai.counttokensrequest.md
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 %}
Params for calling GenerativeModel.countTokens()
<b>Signature:</b>
export interface CountTokensRequest
| Property | Type | Description |
|---|---|---|
| contents | Content<!-- -->[] | |
| generationConfig | GenerationConfig | Configuration options that control how the model generates a response. |
| systemInstruction | string | Part | Content | Instructions that direct the model to behave a certain way. |
| tools | Tool<!-- -->[] | Tool configuration. |
<b>Signature:</b>
contents: Content[];
Configuration options that control how the model generates a response.
<b>Signature:</b>
generationConfig?: GenerationConfig;
Instructions that direct the model to behave a certain way.
<b>Signature:</b>
systemInstruction?: string | Part | Content;
Tool configuration.
<b>Signature:</b>
tools?: Tool[];