Table of Contents

Class CollectionVectorizeAttribute

Namespace
DataStax.AstraDB.DataApi.Core
Assembly
DataStax.AstraDB.DataApi.dll

Specifies vectorize options for a collection.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class CollectionVectorizeAttribute : BaseVectorizeAttribute, _Attribute
Inheritance
CollectionVectorizeAttribute
Implements
Inherited Members

Constructors

CollectionVectorizeAttribute()

Initializes a new instance of CollectionVectorizeAttribute with default settings.

public CollectionVectorizeAttribute()

CollectionVectorizeAttribute(string, string, SimilarityMetric, int, string[], object[])

Initializes a new instance with the specified provider and model name and optionally other settings.

public CollectionVectorizeAttribute(string provider, string modelName, SimilarityMetric metric, int dimension = -1, string[] authenticationPairs = null, object[] parameterPairs = null)

Parameters

provider string

The name of the embedding service provider.

modelName string

The model name to use for embedding generation.

metric SimilarityMetric

The similarity metric to use for vector comparisons.

dimension int

Optional: The number of dimensions for the generated vector.

authenticationPairs string[]

Optional: Key-value pairs for authenticating with the embedding service.

parameterPairs object[]

Optional: Additional key-value parameter pairs for the embedding service.

CollectionVectorizeAttribute(string, string, int, string[], object[])

Initializes a new instance with the specified provider and model name and optionally other settings.

public CollectionVectorizeAttribute(string provider, string modelName, int dimension = -1, string[] authenticationPairs = null, object[] parameterPairs = null)

Parameters

provider string

The name of the embedding service provider.

modelName string

The model name to use for embedding generation.

dimension int

Optional: The number of dimensions for the generated vector.

authenticationPairs string[]

Optional: Key-value pairs for authenticating with the embedding service.

parameterPairs object[]

Optional: Additional key-value parameter pairs for the embedding service.

Properties

Metric

The similarity metric to use for vector comparisons.

public SimilarityMetric? Metric { get; set; }

Property Value

SimilarityMetric?