Class CollectionVectorAttribute
Specifies vector options for a collection.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class CollectionVectorAttribute : Attribute, _Attribute
- Inheritance
-
CollectionVectorAttribute
- Implements
- Inherited Members
Constructors
CollectionVectorAttribute()
Initializes a new instance of CollectionVectorAttribute with default settings.
public CollectionVectorAttribute()
CollectionVectorAttribute(SimilarityMetric, int, string)
Initializes a new instance with the specified metric and optionally other settings.
public CollectionVectorAttribute(SimilarityMetric metric, int dimension = -1, string sourceModel = null)
Parameters
metricSimilarityMetricThe similarity metric to use for vector comparisons.
dimensionintOptional. The number of dimensions for the vector.
sourceModelstringOptional. The source model for embeddings optimization.
CollectionVectorAttribute(int, string)
Initializes a new instance, optionally specifying various settings.
public CollectionVectorAttribute(int dimension = -1, string sourceModel = null)
Parameters
dimensionintOptional. The number of dimensions for the vector.
sourceModelstringOptional. The source model for embeddings optimization.
Properties
Dimension
The number of dimensions for the vector.
public int? Dimension { get; set; }
Property Value
- int?
Metric
The similarity metric to use for vector comparisons.
public SimilarityMetric? Metric { get; set; }
Property Value
SourceModel
Configures the index with the fastest settings for a given source of embeddings vectors. Example values include 'openai-v3-large', 'cohere-v3', 'bert'. Defaults to 'other' if not set.
public string SourceModel { get; set; }