20 instantiations of UsageDetails
Microsoft.Extensions.AI.Abstractions (1)
Contents\UsageContent.cs (1)
22_details = new();
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatCompletionTests.cs (3)
106UsageDetails usage = new(); 140Usage = new UsageDetails(), 264Usage = new UsageDetails { TotalTokenCount = 123 },
ChatCompletion\StreamingChatCompletionUpdateExtensionsTests.cs (3)
50new() { ChoiceIndex = 0, Contents = new[] { new UsageContent(new() { InputTokenCount = 1, OutputTokenCount = 2 }) } }, 51new() { ChoiceIndex = 3, Contents = new[] { new UsageContent(new() { InputTokenCount = 4, OutputTokenCount = 5 }) } }, 199new() { Contents = [new UsageContent(new() { TotalTokenCount = 42 })] },
Contents\UsageContentTests.cs (2)
35UsageDetails details = new(); 43UsageDetails details2 = new();
Embeddings\EmbeddingTests.cs (1)
17UsageDetails usage = new();
Embeddings\GeneratedEmbeddingsTests.cs (1)
98UsageDetails usage = new();
Microsoft.Extensions.AI.AzureAIInference (3)
AzureAIInferenceChatClient.cs (2)
124usage = new() 216completionUpdate.Contents.Add(new UsageContent(new()
AzureAIInferenceEmbeddingGenerator.cs (1)
101result.Usage = new()
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (1)
198return new()
OllamaEmbeddingGenerator.cs (1)
136usage = new()
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (1)
293UsageDetails usageDetails = new()
OpenAIEmbeddingGenerator.cs (1)
125Usage = new()
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\OpenTelemetryChatClientTests.cs (2)
46Usage = new UsageDetails 80Contents = [new UsageContent(new()
17 references to UsageDetails
Microsoft.Extensions.AI.Abstractions (7)
ChatCompletion\ChatCompletion.cs (1)
74public UsageDetails? Usage { get; set; }
Contents\UsageContent.cs (5)
17private UsageDetails _details; 19/// <summary>Initializes a new instance of the <see cref="UsageContent"/> class with an empty <see cref="UsageDetails"/>.</summary> 25/// <summary>Initializes a new instance of the <see cref="UsageContent"/> class with the specified <see cref="UsageDetails"/> instance.</summary> 28public UsageContent(UsageDetails details) 34public UsageDetails Details
Embeddings\GeneratedEmbeddings.cs (1)
43public UsageDetails? Usage { get; set; }
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatCompletionTests.cs (1)
106UsageDetails usage = new();
Contents\UsageContentTests.cs (3)
35UsageDetails details = new(); 43UsageDetails details2 = new(); 53UsageDetails d = c.Details;
Embeddings\EmbeddingTests.cs (1)
17UsageDetails usage = new();
Embeddings\GeneratedEmbeddingsTests.cs (1)
98UsageDetails usage = new();
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
121UsageDetails? usage = null;
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (1)
194private static UsageDetails? ParseOllamaChatResponseUsage(OllamaChatResponse response)
OllamaEmbeddingGenerator.cs (1)
133UsageDetails? usage = null;
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
293UsageDetails usageDetails = new()