Implemented interface members:
28 references to Count
Microsoft.Extensions.AI (6)
Embeddings\CachingEmbeddingGenerator.cs (5)
52if (generated.Count != 1) 54throw new 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)
147if (embeddings.Count != inputsCount) 149throw new InvalidOperationException($"Expected the number of embeddings ({embeddings.Count}) to match the number of inputs ({inputsCount})."); 152var results = new (TInput, TEmbedding)[embeddings.Count];
Microsoft.Extensions.AI.Abstractions.Tests (19)
Embeddings\GeneratedEmbeddingsTests.cs (19)
39Assert.Equal(0, instance.Count); 66Assert.Equal(2, generatedEmbeddings.Count); 87Assert.Equal(3, generatedEmbeddings.Count); 119Assert.Equal(1, embeddings.Count); 133Assert.Equal(2, embeddings.Count); 147Assert.Equal(2, embeddings.Count); 150Assert.Equal(0, embeddings.Count); 163Assert.Equal(2, embeddings.Count); 166Assert.Equal(1, embeddings.Count); 170Assert.Equal(1, embeddings.Count); 174Assert.Equal(0, embeddings.Count); 186Assert.Equal(2, embeddings.Count); 189Assert.Equal(1, embeddings.Count); 193Assert.Equal(0, embeddings.Count); 205Assert.Equal(2, embeddings.Count); 209Assert.Equal(3, embeddings.Count); 223Assert.Equal(2, embeddings.Count); 227Assert.Equal(2, embeddings.Count); 241Assert.Equal(2, embeddings.Count);