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