VectorStoreVectorAttribute 类

定义

定义一个属性,用于将记录类上的属性标记为向量。

public ref class VectorStoreVectorAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false)]
public sealed class VectorStoreVectorAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false)>]
type VectorStoreVectorAttribute = class
    inherit Attribute
Public NotInheritable Class VectorStoreVectorAttribute
Inherits Attribute
继承
VectorStoreVectorAttribute
属性

注解

此处定义的特征会影响矢量存储对属性的处理方式。

构造函数

名称 说明
VectorStoreVectorAttribute(Int32)

初始化 VectorStoreVectorAttribute 类的新实例。

属性

名称 说明
Dimensions

获取向量具有的维度数。

DistanceFunction

获取比较向量时要使用的距离函数。

IndexKind

获取要使用的索引类型。

StorageName

获取用于存储中属性的可选名称(如果不同于属性名称)。

适用于