Skip to content

AudioUsage

Namespace: Vercel.AI.Provider

public sealed class AudioUsage

Numeric usage from a speech or transcription call. A count stays unset when the provider does not report that unit.

Inheritance: object

View source

AudioUsage(int?, double?, int?, int?, int?)

Section titled “AudioUsage(int?, double?, int?, int?, int?)”
public AudioUsage(int? characters = null, double? seconds = null, int? inputTokens = null, int? outputTokens = null, int? totalTokens = null)

Creates usage. Counts that the provider did not report stay null.

Parameters

Name Type Description
characters int?
seconds double?
inputTokens int?
outputTokens int?
totalTokens int?

View source

public int? Characters { get; }

Character count, when the provider reports one.

Value: int?

View source

public int? InputTokens { get; }

Prompt tokens, when the provider reports them.

Value: int?

View source

public int? OutputTokens { get; }

Generated tokens, when the provider reports them.

Value: int?

View source

public double? Seconds { get; }

Duration in seconds, when the provider reports one.

Value: double?

View source

public int? TotalTokens { get; }

Input plus output tokens, when the provider reports them.

Value: int?

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product