34 references to Embedding
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (1)
224return Task.FromResult(new GeneratedEmbeddings<Embedding<float>>(inputs.Select(i => new Embedding<float>(floats))));
Aspire.OpenAI.Tests (1)
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (1)
225return Task.FromResult(new GeneratedEmbeddings<Embedding<float>>(inputs.Select(i => new Embedding<float>(floats))));
Microsoft.Extensions.AI.Abstractions.Tests (26)
Embeddings\EmbeddingGeneratorExtensionsTests.cs (2)
31Embedding<float> result = new(new float[] { 1f, 2f, 3f }); 52.Select(i => new Embedding<float>(Enumerable.Range(i, 4).Select(i => (float)i).ToArray()))
Embeddings\EmbeddingTests.cs (4)
22Embedding<float> e = new(floats) 43Embedding<Half> e = new(halfs); 57Embedding<float> e = new(floats); 70Embedding<double> e = new(floats);
Embeddings\GeneratedEmbeddingsTests.cs (20)
41Assert.False(instance.Contains(new Embedding<float>(new float[] { 1, 2, 3 }))); 44Assert.Equal(-1, instance.IndexOf(new Embedding<float>(new float[] { 1, 2, 3 }))); 85var e = new Embedding<float>(new float[] { 7, 8, 9 }); 116var e = new Embedding<float>(new float[] { 1, 2, 3 }); 128var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 129var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 143var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 144var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 159var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 160var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 182var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 183var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 201var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 202var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 207var e3 = new Embedding<float>(new float[] { 7, 8, 9 }); 219var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 220var e2 = new Embedding<float>(new float[] { 4, 5, 6 }); 225var e3 = new Embedding<float>(new float[] { 7, 8, 9 }); 237var e1 = new Embedding<float>(new float[] { 1, 2, 3 }); 238var e2 = new Embedding<float>(new float[] { 4, 5, 6 });
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceEmbeddingGenerator.cs (1)
93new Embedding<float>(ParseBase64Floats(e.Embedding))
Microsoft.Extensions.AI.Integration.Tests (1)
QuantizationEmbeddingGenerator.cs (1)
85return new(result)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIEmbeddingGenerator.cs (1)
119new Embedding<float>(e.ToFloats())
Microsoft.Extensions.AI.Tests (3)
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (1)
17private readonly Embedding<float> _expectedEmbedding = new(new float[] { 1.0f, 2.0f, 3.0f })
Embeddings\LoggingEmbeddingGeneratorTests.cs (1)
39return Task.FromResult(new GeneratedEmbeddings<Embedding<float>>([new Embedding<float>(new float[] { 1f, 2f, 3f })]));
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
60e.Add(new Embedding<float>(default));