Table of Contents

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

provider string

The vendor whose model defines the space.

modelIdentifier string

The model identifier the provider publishes.

modelVersion string

The model version the provider exposes, or null.

dimension int

The width of the vectors this space holds.

distanceMetric EmbeddingDistanceMetric

How distance is measured between two of its vectors.

inputPreparation EmbeddingInputPreparation

What is done to a passage before it is sent.

Returns

EmbeddingProfileIdentity

The profile identity.

Exceptions

ArgumentNullException

Thrown when inputPreparation is null.

ArgumentException

Thrown when a name is blank or longer than the bound its column carries.

ArgumentOutOfRangeException

Thrown when the dimension is not positive.