Implemented interface members:
28 references to Count
Microsoft.Extensions.AI (6)
Embeddings\CachingEmbeddingGenerator.cs (5)
52if (generated.Count != 1) 54Throw.InvalidOperationException($"Expected exactly one embedding to be generated, but received {generated.Count}."); 81(uncached ??= []).Add((results.Count, cacheKey, input)); 93for (int i = 0; i < uncachedResults.Count; i++) 99for (int i = 0; i < uncachedResults.Count; i++)
Embeddings\LoggingEmbeddingGenerator.cs (1)
67LogCompleted(embeddings.Count);
Microsoft.Extensions.AI.Abstractions (3)
Embeddings\EmbeddingGeneratorExtensions.cs (3)
197if (embeddings.Count != inputsCount) 199Throw.InvalidOperationException($"Expected the number of embeddings ({embeddings.Count}) to match the number of inputs ({inputsCount})."); 202var results = new (TInput, TEmbedding)[embeddings.Count];
Microsoft.Extensions.AI.Abstractions.Tests (19)
Embeddings\GeneratedEmbeddingsTests.cs (19)
40Assert.Equal(0, instance.Count); 67Assert.Equal(2, generatedEmbeddings.Count); 88Assert.Equal(3, generatedEmbeddings.Count); 120Assert.Equal(1, embeddings.Count); 134Assert.Equal(2, embeddings.Count); 148Assert.Equal(2, embeddings.Count); 151Assert.Equal(0, embeddings.Count); 164Assert.Equal(2, embeddings.Count); 167Assert.Equal(1, embeddings.Count); 171Assert.Equal(1, embeddings.Count); 175Assert.Equal(0, embeddings.Count); 187Assert.Equal(2, embeddings.Count); 190Assert.Equal(1, embeddings.Count); 194Assert.Equal(0, embeddings.Count); 206Assert.Equal(2, embeddings.Count); 210Assert.Equal(3, embeddings.Count); 224Assert.Equal(2, embeddings.Count); 228Assert.Equal(2, embeddings.Count); 242Assert.Equal(2, embeddings.Count);