Vertex AI v1 API - Class GenerateContentResponse.Types.UsageMetadata (3.65.0)

public sealed class GenerateContentResponse.Types.UsageMetadata : IMessage<GenerateContentResponse.Types.UsageMetadata>, IEquatable<GenerateContentResponse.Types.UsageMetadata>, IDeepCloneable<GenerateContentResponse.Types.UsageMetadata>, IBufferMessage, IMessage

Reference documentation and code samples for the Vertex AI v1 API class GenerateContentResponse.Types.UsageMetadata.

Usage metadata about response(s).

Inheritance

object > GenerateContentResponse.Types.UsageMetadata

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Constructors

UsageMetadata()

public UsageMetadata()

UsageMetadata(UsageMetadata)

public UsageMetadata(GenerateContentResponse.Types.UsageMetadata other)
Parameter
Name Description
other GenerateContentResponseTypesUsageMetadata

Properties

CacheTokensDetails

public RepeatedField<ModalityTokenCount> CacheTokensDetails { get; }

Output only. List of modalities of the cached content in the request input.

Property Value
Type Description
RepeatedFieldModalityTokenCount

CachedContentTokenCount

public int CachedContentTokenCount { get; set; }

Output only. Number of tokens in the cached part in the input (the cached content).

Property Value
Type Description
int

CandidatesTokenCount

public int CandidatesTokenCount { get; set; }

Number of tokens in the response(s).

Property Value
Type Description
int

CandidatesTokensDetails

public RepeatedField<ModalityTokenCount> CandidatesTokensDetails { get; }

Output only. List of modalities that were returned in the response.

Property Value
Type Description
RepeatedFieldModalityTokenCount

PromptTokenCount

public int PromptTokenCount { get; set; }

Number of tokens in the request. When cached_content is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.

Property Value
Type Description
int

PromptTokensDetails

public RepeatedField<ModalityTokenCount> PromptTokensDetails { get; }

Output only. List of modalities that were processed in the request input.

Property Value
Type Description
RepeatedFieldModalityTokenCount

ThoughtsTokenCount

public int ThoughtsTokenCount { get; set; }

Output only. Number of tokens present in thoughts output.

Property Value
Type Description
int

ToolUsePromptTokensDetails

public RepeatedField<ModalityTokenCount> ToolUsePromptTokensDetails { get; }

Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input.

Property Value
Type Description
RepeatedFieldModalityTokenCount

TotalTokenCount

public int TotalTokenCount { get; set; }

Total token count for prompt and response candidates.

Property Value
Type Description
int

TrafficType

public GenerateContentResponse.Types.UsageMetadata.Types.TrafficType TrafficType { get; set; }

Output only. The traffic type for this request.

Property Value
Type Description
GenerateContentResponseTypesUsageMetadataTypesTrafficType