7 instantiations of BinaryEmbedding
Microsoft.Extensions.AI.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BinaryEmbedding.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.BinaryEmbedding((global::System.Collections.BitArray)args[0]),
Microsoft.Extensions.AI.Abstractions.Tests (4)
Embeddings\BinaryEmbeddingTests.cs (3)
20BinaryEmbedding e = new(vector); 32BinaryEmbedding e = new(vector); 67BinaryEmbedding e = new(vector);
Generated\361d1da7f942c932\TestJsonSerializerContext.BinaryEmbedding.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.BinaryEmbedding((global::System.Collections.BitArray)args[0]),
Microsoft.Extensions.AI.Integration.Tests (1)
QuantizationEmbeddingGenerator.cs (1)
59return new(result)
Microsoft.Extensions.VectorData.ConformanceTests (1)
TypeTests\EmbeddingTypeTests.cs (1)
201=> Task.FromResult(new GeneratedEmbeddings<BinaryEmbedding>([new(data)]));
52 references to BinaryEmbedding
Microsoft.Extensions.AI.Abstractions (20)
Embeddings\BinaryEmbedding.cs (1)
20/// <summary>Initializes a new instance of the <see cref="BinaryEmbedding"/> class with the embedding vector.</summary>
Embeddings\Embedding.cs (1)
13[JsonDerivedType(typeof(BinaryEmbedding), typeDiscriminator: "binary")]
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BinaryEmbedding.g.cs (17)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>? _BinaryEmbedding; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> BinaryEmbedding 24get => _BinaryEmbedding ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.BinaryEmbedding)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> Create_BinaryEmbedding(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.BinaryEmbedding>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.BinaryEmbedding> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Collections.BitArray)}, modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.Extensions.AI.BinaryEmbedding), 59Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Collections.BitArray>)ExpandConverter(typeof(global::System.Collections.BitArray), new global::Microsoft.Extensions.AI.BinaryEmbedding.VectorConverter(), options), 60Getter = static obj => ((global::Microsoft.Extensions.AI.BinaryEmbedding)obj).Vector, 61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.BinaryEmbedding)obj).Vector = value!, 68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetProperty("Vector", InstanceMemberBindingFlags, null, typeof(global::System.Collections.BitArray), global::System.Array.Empty<global::System.Type>(), null), 80DeclaringType = typeof(global::Microsoft.Extensions.AI.BinaryEmbedding), 90AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetProperty("Dimensions", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (1)
80if (type == typeof(global::Microsoft.Extensions.AI.BinaryEmbedding))
Microsoft.Extensions.AI.Abstractions.Tests (25)
Embeddings\BinaryEmbeddingTests.cs (7)
20BinaryEmbedding e = new(vector); 32BinaryEmbedding e = new(vector); 67BinaryEmbedding e = new(vector); 72BinaryEmbedding result = Assert.IsType<BinaryEmbedding>(JsonSerializer.Deserialize(json, TestJsonSerializerContext.Default.Embedding)); 80BinaryEmbedding result = Assert.IsType<BinaryEmbedding>(JsonSerializer.Deserialize(
Generated\361d1da7f942c932\TestJsonSerializerContext.BinaryEmbedding.g.cs (17)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>? _BinaryEmbedding; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> BinaryEmbedding 22get => _BinaryEmbedding ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.BinaryEmbedding)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> Create_BinaryEmbedding(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.BinaryEmbedding>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.BinaryEmbedding> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.BinaryEmbedding> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Collections.BitArray)}, modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.BinaryEmbedding>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.Extensions.AI.BinaryEmbedding), 57Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Collections.BitArray>)ExpandConverter(typeof(global::System.Collections.BitArray), new global::Microsoft.Extensions.AI.BinaryEmbedding.VectorConverter(), options), 58Getter = static obj => ((global::Microsoft.Extensions.AI.BinaryEmbedding)obj).Vector, 59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.BinaryEmbedding)obj).Vector = value!, 66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetProperty("Vector", InstanceMemberBindingFlags, null, typeof(global::System.Collections.BitArray), global::System.Array.Empty<global::System.Type>(), null), 78DeclaringType = typeof(global::Microsoft.Extensions.AI.BinaryEmbedding), 88AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.BinaryEmbedding).GetProperty("Dimensions", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
Generated\361d1da7f942c932\TestJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
74if (type == typeof(global::Microsoft.Extensions.AI.BinaryEmbedding))
Microsoft.Extensions.AI.Integration.Tests (4)
QuantizationEmbeddingGenerator.cs (4)
17IEmbeddingGenerator<string, BinaryEmbedding> 35async Task<GeneratedEmbeddings<BinaryEmbedding>> IEmbeddingGenerator<string, BinaryEmbedding>.GenerateAsync( 46private static BinaryEmbedding QuantizeToBinary(Embedding<float> embedding)
Microsoft.Extensions.VectorData.ConformanceTests (3)
TypeTests\EmbeddingTypeTests.cs (3)
195protected sealed class BinaryEmbeddingGenerator(BitArray data) : IEmbeddingGenerator<string, BinaryEmbedding> 197public Task<GeneratedEmbeddings<BinaryEmbedding>> GenerateAsync( 201=> Task.FromResult(new GeneratedEmbeddings<BinaryEmbedding>([new(data)]));