Skip to content

.Net: VectorStoreRecordVectorProperty type restrictions #10875

Closed as not planned
@markwallace-microsoft

Description

@markwallace-microsoft

The following​ code causes an exception:

→ new VectorStoreRecordVectorProperty("DescriptionEmbedding", typeof(float)) { Dimensions = 4, DistanceFunction = DistanceFunction.CosineDistance, IndexKind = IndexKind.Hnsw },

The embedding is an array, but alternative types also fail:
typeof(float[]) → exception
typeof(List) → exception
typeof(ReadOnlyMemory) → works
The type constraint seems too strict. It should support float[], List, IEnumerable, etc.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeNextSemestermsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions