Language

CollectionJsonModelBuilder Class

Definition

Represents a model builder that performs logic specific to providers that use System.Text.Json for serialization. This is an internal support type meant for use by providers only and not by applications.

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

Constructors

Name Description
CollectionJsonModelBuilder(CollectionModelBuildingOptions)

Initializes a new instance of the CollectionJsonModelBuilder class.

Properties

Name Description
DataProperties

Gets the data properties of the record.

(Inherited from CollectionModelBuilder)
DefaultEmbeddingGenerator

Gets the default embedding generator to use for vector properties, when none is specified at the property or collection level.

(Inherited from CollectionModelBuilder)
EmbeddingGenerationDispatchers

Gets the embedding types supported by this provider, in priority order. The first type whose embedding generator is compatible with the input type will be used.

(Inherited from CollectionModelBuilder)
KeyProperties

Gets the key properties of the record.

(Inherited from CollectionModelBuilder)
KeyType

Gets the collection's generic key type parameter (TKey), if provided. Used by ValidateKeyProperty(KeyPropertyModel) to validate that TKey corresponds to the key property type on the model.

(Inherited from CollectionModelBuilder)
Options

Gets the options for building the model.

(Inherited from CollectionModelBuilder)
Properties

Gets all properties of the record, of all types.

(Inherited from CollectionModelBuilder)
PropertyMap

Gets all properties of the record, of all types, indexed by their model name.

(Inherited from CollectionModelBuilder)
VectorProperties

Gets the vector properties of the record.

(Inherited from CollectionModelBuilder)

Methods

Name Description
Build(Type, Type, VectorStoreCollectionDefinition, IEmbeddingGenerator, JsonSerializerOptions)

Builds and returns a CollectionModel from the given recordType and definition.

Build(Type, Type, VectorStoreCollectionDefinition, IEmbeddingGenerator)

Builds and returns an CollectionModel from the given recordType and definition.

(Inherited from CollectionModelBuilder)
BuildDynamic(VectorStoreCollectionDefinition, IEmbeddingGenerator, JsonSerializerOptions)

Builds and returns a CollectionModel for dynamic mapping scenarios from the given definition.

BuildDynamic(VectorStoreCollectionDefinition, IEmbeddingGenerator)

Builds and returns an CollectionModel for dynamic mapping scenarios from the given definition.

(Inherited from CollectionModelBuilder)
Customize()

Extension hook for providers to be able to customize the model.

IsDataPropertyTypeValid(Type, String)

Validates that the .NET type for a data property is supported by the provider.

(Inherited from CollectionModelBuilder)
IsVectorPropertyTypeValid(Type, String)

Validates that the .NET type for a vector property is supported by the provider.

(Inherited from CollectionModelBuilder)
ProcessProperty(PropertyInfo, VectorStoreProperty)

As part of building the model, this method processes a single property, accepting both a CLR PropertyInfo (from which attributes are read) and a VectorStoreProperty from the user-provided record definition. Either may be null, but not both. When both are provided, the record definition values override attribute-configured values.

(Inherited from CollectionModelBuilder)
SupportsKeyAutoGeneration(Type)

Configures auto-generation for the given key property. Defaults to configuring Guid key properties as auto-generated, and throwing if auto-generation is requested for any other type.

(Inherited from CollectionModelBuilder)
Validate(Type, VectorStoreCollectionDefinition)

Validates the model after all properties have been processed.

(Inherited from CollectionModelBuilder)
ValidateKeyProperty(KeyPropertyModel)

Validates the key property. The default implementation validates that the collection's generic key type (KeyType) corresponds to the key property type on the model, if KeyType was provided. Provider overrides should call the base implementation.

(Inherited from CollectionModelBuilder)
ValidateProperty(PropertyModel, VectorStoreCollectionDefinition)

Validates a single property, performing validation on it.

(Inherited from CollectionModelBuilder)

Applies to