Class CollectionVectorizeAttribute
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
providerstringThe name of the embedding service provider.
modelNamestringThe model name to use for embedding generation.
metricSimilarityMetricThe similarity metric to use for vector comparisons.
dimensionintOptional: The number of dimensions for the generated vector.
authenticationPairsstring[]Optional: Key-value pairs for authenticating with the embedding service.
parameterPairsobject[]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
providerstringThe name of the embedding service provider.
modelNamestringThe model name to use for embedding generation.
dimensionintOptional: The number of dimensions for the generated vector.
authenticationPairsstring[]Optional: Key-value pairs for authenticating with the embedding service.
parameterPairsobject[]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; }