你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AIInferenceModelFactory.CompletionsUsage(Int32, Int32, Int32) Method

Definition

Initializes a new instance of CompletionsUsage.

public static Azure.AI.Inference.CompletionsUsage CompletionsUsage(int completionTokens = 0, int promptTokens = 0, int totalTokens = 0);
static member CompletionsUsage : int * int * int -> Azure.AI.Inference.CompletionsUsage
Public Shared Function CompletionsUsage (Optional completionTokens As Integer = 0, Optional promptTokens As Integer = 0, Optional totalTokens As Integer = 0) As CompletionsUsage

Parameters

completionTokens
Int32

The number of tokens generated across all completions emissions.

promptTokens
Int32

The number of tokens in the provided prompts for the completions request.

totalTokens
Int32

The total number of tokens processed for the completions request and response.

Returns

A new CompletionsUsage instance for mocking.

Applies to