Table of Contents

Class CountTokensRequest

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Request to count tokens.

public class CountTokensRequest
Inheritance
CountTokensRequest
Inherited Members
Extension Methods

Properties

Contents

Optional. The input given to the model as a prompt. This field is ignored when GenerateContentRequest is set.

[JsonPropertyName("contents")]
public List<Content>? Contents { get; set; }

Property Value

List<Content>

GenerateContentRequest

Optional. The overall input given to the Model. This includes the prompt as well as other model steering information like system instructions, and/or function declarations for function calling. Model/Contents and generateContentRequests are mutually exclusive. You can either send Model + Contents or a generateContentRequest, but never both.

[JsonPropertyName("generateContentRequest")]
public GenerateContentRequestForCountToken? GenerateContentRequest { get; set; }

Property Value

GenerateContentRequestForCountToken

See Also