Table of Contents

Class TokensInfo

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Tokens info with a list of tokens and the corresponding list of token ids.

public class TokensInfo
Inheritance
TokensInfo
Inherited Members
Extension Methods

Properties

Role

Optional. The role of the corresponding content.

[JsonPropertyName("role")]
public string? Role { get; set; }

Property Value

string

TokenIds

A list of token ids from the input.

[JsonPropertyName("tokenIds")]
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
public List<long>? TokenIds { get; set; }

Property Value

List<long>

Tokens

A list of tokens from the input (raw bytes; base64 encoded on the wire).

[JsonPropertyName("tokens")]
public List<byte[]>? Tokens { get; set; }

Property Value

List<byte[]>