Files
anthropic-client/src/AnthropicClient/Models/Usage.cs
T

33 lines
900 B
C#
Raw Normal View History

2024-06-27 23:26:53 -05:00
using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
/// <summary>
2024-07-03 16:57:27 -05:00
/// Represents the usage of a response.
2024-06-27 23:26:53 -05:00
/// </summary>
2024-07-03 16:57:27 -05:00
public class Usage
2024-06-27 23:26:53 -05:00
{
/// <summary>
/// Gets the number of input tokens used.
/// </summary>
[JsonPropertyName("input_tokens")]
2024-06-28 10:54:00 -05:00
public int InputTokens { get; init; }
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the number of output tokens used.
/// </summary>
[JsonPropertyName("output_tokens")]
2024-06-28 10:54:00 -05:00
public int OutputTokens { get; init; }
2024-08-15 23:04:45 -05:00
/// <summary>
/// Gets the number of tokens written to the cache when creating a new entry
/// </summary>
[JsonPropertyName("cache_creation_input_tokens")]
public int CacheCreationInputTokens { get; init; }
/// <summary>
/// Gets the number of tokens retrieved from the cache for the request.
/// </summary>
[JsonPropertyName("cache_read_input_tokens")]
public int CacheReadInputTokens { get; init; }
2024-06-27 23:26:53 -05:00
}