Class EmbeddingEndpoint
- Namespace
- MailFathom.AI.Embeddings
- Assembly
- MailFathom.AI.dll
One route to a vector space: where to send a request, what to route it to, and how to authenticate.
public sealed record EmbeddingEndpoint : IEquatable<EmbeddingEndpoint>
- Inheritance
-
EmbeddingEndpoint
- Implements
- Inherited Members
Remarks
The alias exists because everything else here is either an address or a credential, and neither may be written down. An address identifies a tenant and a resource, so a failure that named one would put it in every log line; the alias is a name the operator chose, which is exactly what ADR 0003 permits a message to carry.
RoutedModelName is separate from the identity's model identifier because the two answer
different questions. The identity says which model produced a vector and is what makes two vectors comparable;
the routed name says which string this endpoint recognizes, and a cloud deployment names that after itself. Keeping
them apart is what lets one vector space be reached through a first-party API and a cloud deployment of the same
model, which is the case a fallback chain exists for.
SupportsRequestedDimension is declared rather than inferred from the model name, for the reason
ADR 0006
gives for the model never being a compile-time constant: a table of which models accept the parameter would be a
list of model names in code, and it would be wrong the week after it was written.
Constructors
- EmbeddingEndpoint(string, EmbeddingProfileIdentity, Uri?, string, bool)
One route to a vector space: where to send a request, what to route it to, and how to authenticate.
Properties
- Alias
The deployment's own name for this endpoint, which is what a log, a metric, and a failure message call it.
- Identity
The geometry this endpoint produces vectors in. Every endpoint of one chain declares the same one, and startup refuses a chain where they differ.
- RoutedModelName
What is sent as the model of a request, which for a cloud deployment is the deployment's name rather than the vendor's model identifier.
- SupportsRequestedDimension
Whether the endpoint honours a requested vector width, so a narrower space is asked for rather than cut out of a wider answer.