Class CompletionsUsage
Representation of the token counts processed for a completions request. Counts consider all tokens across prompts, choices, choice alternates, best_of generations, and other consumers.
Inheritance
object
CompletionsUsage
Implements
IEquatable<CompletionsUsage>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotnetPrompt.LLM.OpenAI.Model
Assembly: DotnetPrompt.LLM.OpenAI.dll
Syntax
public record CompletionsUsage : IEquatable<CompletionsUsage>
Properties
| Improve this Doc View SourceCompletionTokens
Number of tokens received in the completion.
Declaration
[JsonPropertyName("completion_tokens")]
public int CompletionTokens { get; init; }
Property Value
Type | Description |
---|---|
int |
PromptTokens
Number of tokens sent in the original request.
Declaration
[JsonPropertyName("prompt_tokens")]
public int PromptTokens { get; init; }
Property Value
Type | Description |
---|---|
int |
TotalTokens
Total number of tokens transacted in this request/response.
Declaration
[JsonPropertyName("total_tokens")]
public int TotalTokens { get; init; }
Property Value
Type | Description |
---|---|
int |
Implements
System.IEquatable<T>