1 write to AdditionalProperties
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
302
(usageDetails.
AdditionalProperties
= [])[nameof(tokenUsage.OutputTokenDetails)] = new Dictionary<string, object?>
10 references to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
UsageDetails.cs (1)
48
if (
AdditionalProperties
is { } additionalProperties)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\UsageContentTests.cs (1)
29
Assert.Null(c.Details.
AdditionalProperties
);
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIChatClientTests.cs (8)
202
Assert.NotNull(response.Usage.
AdditionalProperties
);
278
Assert.NotNull(usage.Details.
AdditionalProperties
);
279
Assert.Equal(new Dictionary<string, object> { [nameof(ChatOutputTokenUsageDetails.ReasoningTokenCount)] = 0 }, usage.Details.
AdditionalProperties
[nameof(ChatTokenUsage.OutputTokenDetails)]);
475
Assert.NotNull(response.Usage.
AdditionalProperties
);
568
Assert.NotNull(response.Usage.
AdditionalProperties
);
785
Assert.NotNull(usage.Details.
AdditionalProperties
);
786
Assert.Equal(new Dictionary<string, object> { [nameof(ChatOutputTokenUsageDetails.ReasoningTokenCount)] = 0 }, usage.Details.
AdditionalProperties
[nameof(ChatTokenUsage.OutputTokenDetails)]);
919
Assert.NotNull(response.Usage.
AdditionalProperties
);