Search Results for

    Show / Hide Table of Contents

    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 Source

    CompletionTokens

    Number of tokens received in the completion.

    Declaration
    [JsonPropertyName("completion_tokens")]
    public int CompletionTokens { get; init; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    PromptTokens

    Number of tokens sent in the original request.

    Declaration
    [JsonPropertyName("prompt_tokens")]
    public int PromptTokens { get; init; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    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>
    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • CompletionTokens
      • PromptTokens
      • TotalTokens
    • Implements
    Back to top Copyright 2023 © Pavel «xakpc» Osadchuk for DotnetPrompt