Class GeminiUsageMetadata
- Namespace
- Uralstech.UGemini.Models.Generation.Candidate
Metadata on the generation request's token usage.
public class GeminiUsageMetadata : IAppendableData<GeminiUsageMetadata>
- Inheritance
-
GeminiUsageMetadata
- Implements
- Extension Methods
Fields
CachedContentTokenCount
Number of tokens in the cached part of the prompt, i.e. in the cached content.
public int CachedContentTokenCount
Field Value
CandidatesTokenCount
Total number of tokens across the generated candidates.
public int CandidatesTokenCount
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
Remarks
Cached content is not supported in this package.
TotalTokenCount
Total token count for the generation request (prompt + candidates).
public int TotalTokenCount
Field Value
Methods
Append(GeminiUsageMetadata)
Appends the data
to the current IAppendableData<T>.
public void Append(GeminiUsageMetadata data)
Parameters
data
GeminiUsageMetadataThe data to append.