Method Create
- Namespace
- MailFathom.Application.Emails.Embeddings
- Assembly
- MailFathom.Application.dll
Create(string, string, string?, int, EmbeddingDistanceMetric, EmbeddingInputPreparation)
Builds an identity, refusing one that could not describe a vector space.
public static EmbeddingProfileIdentity Create(string provider, string modelIdentifier, string? modelVersion, int dimension, EmbeddingDistanceMetric distanceMetric, EmbeddingInputPreparation inputPreparation)
Parameters
providerstringThe vendor whose model defines the space.
modelIdentifierstringThe model identifier the provider publishes.
modelVersionstringThe model version the provider exposes, or null.
dimensionintThe width of the vectors this space holds.
distanceMetricEmbeddingDistanceMetricHow distance is measured between two of its vectors.
inputPreparationEmbeddingInputPreparationWhat is done to a passage before it is sent.
Returns
- EmbeddingProfileIdentity
The profile identity.
Exceptions
- ArgumentNullException
Thrown when
inputPreparationis null.- ArgumentException
Thrown when a name is blank or longer than the bound its column carries.
- ArgumentOutOfRangeException
Thrown when the dimension is not positive.