Language

VectorPropertyModel Class

Definition

Represents a vector property on a vector store record. This is an internal support type meant for use by providers only and not by applications.

public ref class VectorPropertyModel : Microsoft::Extensions::VectorData::ProviderServices::PropertyModel
[System.Diagnostics.CodeAnalysis.Experimental("MEVD9001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class VectorPropertyModel : Microsoft.Extensions.VectorData.ProviderServices.PropertyModel
public class VectorPropertyModel : Microsoft.Extensions.VectorData.ProviderServices.PropertyModel
[<System.Diagnostics.CodeAnalysis.Experimental("MEVD9001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type VectorPropertyModel = class
    inherit PropertyModel
type VectorPropertyModel = class
    inherit PropertyModel
Public Class VectorPropertyModel
Inherits PropertyModel
Inheritance
VectorPropertyModel
Derived
Attributes

Constructors

Name Description
VectorPropertyModel(String, Type)

Represents a vector property on a vector store record. This is an internal support type meant for use by providers only and not by applications.

Properties

Name Description
Dimensions

Gets or sets the number of dimensions that the vector has.

DistanceFunction

Gets or sets the distance function to use when comparing vectors.

EmbeddingGenerationDispatcher

Gets or sets the EmbeddingGenerationDispatcher that was resolved for this property during model building. This handler is used for runtime embedding generation dispatch.

EmbeddingGenerator

Gets or sets the embedding generator to use for this property.

EmbeddingType

Gets or sets the type representing the embedding stored in the database if EmbeddingGenerator is set. Otherwise, this property is identical to Type.

IndexKind

Gets or sets the kind of index to use.

IsNullable

Gets a value indicating whether the property type is nullable.

(Inherited from PropertyModel)
ModelName

Gets or sets the model name of the property.

(Inherited from PropertyModel)
PropertyInfo

Gets or sets the reflection PropertyInfo for the .NET property.

(Inherited from PropertyModel)
ProviderAnnotations

Gets or sets a dictionary of provider-specific annotations for this property.

(Inherited from PropertyModel)
StorageName

Gets or sets the storage name of the property.

(Inherited from PropertyModel)
Type

Gets or sets the CLR type of the property.

(Inherited from PropertyModel)

Methods

Name Description
CanGenerateEmbedding<TEmbedding>(IEmbeddingGenerator)

Checks whether the given embeddingGenerator can produce embeddings of type TEmbedding for any input type known to this property model. The base implementation checks for String and DataContent; VectorPropertyModel<TInput> also checks for TInput.

GenerateEmbeddingAsync(Object, CancellationToken)

Generates a single embedding for the given value, using the configured EmbeddingGenerationDispatcher.

GenerateEmbeddingsAsync(IEnumerable<Object>, CancellationToken)

Generates embeddings for the given values, using the configured EmbeddingGenerationDispatcher.

GetSupportedInputTypes()

Returns the types of input that this property model supports.

GetValue<T>(Object)

Reads the property from the given record.

(Inherited from PropertyModel)
GetValueAsObject(Object)

Reads the property from the given record, returning the value as an Object.

(Inherited from PropertyModel)
ResolveEmbeddingType<TEmbedding>(IEmbeddingGenerator, Type)

Checks whether the EmbeddingGenerator configured on this property supports the given embedding type. The implementation on this non-generic VectorPropertyModel checks for String and DataContent as input types for EmbeddingGenerator.

SetValue<T>(Object, T)

Writes the property from the given record.

(Inherited from PropertyModel)
SetValueAsObject(Object, Object)

Writes the property from the given record, accepting the value to write as an Object.

(Inherited from PropertyModel)
ToString()

Returns a string that represents the current object.

Applies to