8 writes to OutputTokenCount
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\StreamingChatCompletionUpdateExtensionsTests.cs (2)
50new() { ChoiceIndex = 0, Contents = new[] { new UsageContent(new() { InputTokenCount = 1, OutputTokenCount = 2 }) } }, 51new() { ChoiceIndex = 3, Contents = new[] { new UsageContent(new() { InputTokenCount = 4, OutputTokenCount = 5 }) } },
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
127OutputTokenCount = completionsUsage.CompletionTokens, 219OutputTokenCount = usage.CompletionTokens,
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
201OutputTokenCount = response.EvalCount,
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
296OutputTokenCount = tokenUsage.OutputTokenCount,
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\OpenTelemetryChatClientTests.cs (2)
49OutputTokenCount = 20, 83OutputTokenCount = 20,
19 references to OutputTokenCount
Microsoft.Extensions.AI (2)
ChatCompletion\OpenTelemetryChatClient.cs (2)
330if (usage.OutputTokenCount is int outputTokens) 374if (completion.Usage?.OutputTokenCount is int outputTokens)
Microsoft.Extensions.AI.Abstractions (2)
UsageDetails.cs (2)
38if (OutputTokenCount is int output) 40parts.Add($"{nameof(OutputTokenCount)} = {output}");
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\UsageContentTests.cs (1)
27Assert.Null(c.Details.OutputTokenCount);
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
157Assert.Equal(9, response.Usage.OutputTokenCount); 419Assert.Equal(15, response.Usage.OutputTokenCount);
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (4)
107Assert.True(response.Usage?.OutputTokenCount > 1); 108Assert.Equal(response.Usage?.InputTokenCount + response.Usage?.OutputTokenCount, response.Usage?.TotalTokenCount); 134Assert.True(usage.Details.OutputTokenCount > 1); 135Assert.Equal(usage.Details.InputTokenCount + usage.Details.OutputTokenCount, usage.Details.TotalTokenCount);
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientTests.cs (2)
128Assert.Equal(10, response.Usage.OutputTokenCount); 200Assert.Equal(20, usage.Details.OutputTokenCount);
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIChatClientTests.cs (6)
200Assert.Equal(9, response.Usage.OutputTokenCount); 276Assert.Equal(9, usage.Details.OutputTokenCount); 473Assert.Equal(15, response.Usage.OutputTokenCount); 566Assert.Equal(15, response.Usage.OutputTokenCount); 783Assert.Equal(16, usage.Details.OutputTokenCount); 917Assert.Equal(15, response.Usage.OutputTokenCount);