VoyageProvider.VoyageEmbeddingModel
Namespace: Vercel.AI.Voyage
public sealed class VoyageProvider.VoyageEmbeddingModel : IEmbeddingModelVoyage embedding model.
Inheritance: object
Implements: IEmbeddingModel
Constructors
Section titled “Constructors”VoyageEmbeddingModel(VoyageProvider, string)
Section titled “VoyageEmbeddingModel(VoyageProvider, string)”public VoyageEmbeddingModel(VoyageProvider provider, string modelId)Creates an embedding model.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
VoyageProvider | |
modelId |
string |
Properties
Section titled “Properties”MaxEmbeddingsPerCall
Section titled “MaxEmbeddingsPerCall”public int MaxEmbeddingsPerCall { get; }Maximum values in one call.
Value: int
ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Specification version. Always V4.
Value: string
Methods
Section titled “Methods”DoEmbedAsync(IReadOnlyList<string>, IReadOnlyDictionary<string, JsonElement>?, CancellationToken, int?, IReadOnlyDictionary<string, string?>?)
Section titled “DoEmbedAsync(IReadOnlyList<string>, IReadOnlyDictionary<string, JsonElement>?, CancellationToken, int?, IReadOnlyDictionary<string, string?>?)”public Task<EmbeddingResult> DoEmbedAsync(IReadOnlyList<string> values, IReadOnlyDictionary<string, JsonElement>? providerOptions, CancellationToken cancellationToken, int? dimensions = null, IReadOnlyDictionary<string, string?>? headers = null)Embeds each value. Maps to doEmbed. <code class=“paramref”>providerOptions</code> is keyed by provider id. <code class=“paramref”>dimensions</code> is the requested vector width. A provider option for the same setting wins. <code class=“paramref”>headers</code> are sent with this call and override the provider headers.
Parameters
| Name | Type | Description |
|---|---|---|
values |
IReadOnlyList<string> | |
providerOptions |
IReadOnlyDictionary<string, JsonElement> | |
cancellationToken |
CancellationToken | |
dimensions |
int? | |
headers |
IReadOnlyDictionary<string, string> |
Returns: Task<EmbeddingResult>
EmbedAsync(VoyageEmbeddingRequest, CancellationToken)
Section titled “EmbedAsync(VoyageEmbeddingRequest, CancellationToken)”public Task<VoyageEmbeddingResult> EmbedAsync(VoyageEmbeddingRequest request, CancellationToken cancellationToken)Embeds values and returns usage plus the raw response.
Parameters
| Name | Type | Description |
|---|---|---|
request |
VoyageEmbeddingRequest | |
cancellationToken |
CancellationToken |
Returns: Task<VoyageEmbeddingResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product