Class GeminiUsageMetadata
- Namespace
- Uralstech.UGemini.Models.Generation.Candidate
Metadata on the generation request's token usage.
public class GeminiUsageMetadata : IAppendableData<GeminiUsageMetadata>
- Inheritance
-
objectGeminiUsageMetadata
- Implements
- Extension Methods
Fields
CacheTokensDetails
List of modalities of the cached content in the request input.
public GeminiModalityTokenCount[] CacheTokensDetails
Field Value
CachedContentTokenCount
Number of tokens in the cached part of the prompt, i.e. in the cached content.
public int CachedContentTokenCount
Field Value
- int
CandidatesTokenCount
Total number of tokens across the generated candidates.
public int CandidatesTokenCount
Field Value
- int
CandidatesTokensDetails
List of modalities that were returned in the response.
public GeminiModalityTokenCount[] CandidatesTokensDetails
Field Value
PromptTokenCount
Number of tokens in the prompt. When cachedContent is set, this is still the total effective prompt size. I.e. this includes the number of tokens in the cached content.
public int PromptTokenCount
Field Value
- int
Remarks
Cached content is not supported in this package.
PromptTokensDetails
List of modalities that were processed in the request input.
public GeminiModalityTokenCount[] PromptTokensDetails
Field Value
ThoughtsTokenCount
Number of tokens of thoughts for thinking models.
public int ThoughtsTokenCount
Field Value
- int
ToolUsePromptTokenCount
Number of tokens present in tool-use prompt(s).
public int ToolUsePromptTokenCount
Field Value
- int
ToolUsePromptTokensDetails
List of modalities that were processed for tool-use request inputs.
public GeminiModalityTokenCount[] ToolUsePromptTokensDetails
Field Value
TotalTokenCount
Total token count for the generation request (prompt + candidates).
public int TotalTokenCount
Field Value
- int
Methods
Append(GeminiUsageMetadata)
Appends the data to the current IAppendableData<T>.
public void Append(GeminiUsageMetadata data)
Parameters
dataGeminiUsageMetadataThe data to append.