Skip to content

VoyageProvider

Namespace: Vercel.AI.Voyage

public sealed class VoyageProvider : OpenAICompatibleProvider

Voyage embeddings and reranking.

Inheritance: object → ProviderBase → OpenAICompatibleProvider

View source

VoyageProvider(HttpClient, OpenAICompatibleOptions?)

Section titled “VoyageProvider(HttpClient, OpenAICompatibleOptions?)”
public VoyageProvider(HttpClient httpClient, OpenAICompatibleOptions? options = null)

Creates a provider.

Parameters

Name Type Description
httpClient HttpClient
options OpenAICompatibleOptions

View source

public const string DefaultBaseUrl = "https://api.voyageai.com/v1"

Default API origin.

Value: string

View source

public const string ProviderId = "voyage"

Provider id.

Value: string

View source

Create(OpenAICompatibleOptions?, HttpMessageHandler?)

Section titled “Create(OpenAICompatibleOptions?, HttpMessageHandler?)”
public static VoyageProvider Create(OpenAICompatibleOptions? options = null, HttpMessageHandler? handler = null)

Creates a provider.

Parameters

Name Type Description
options OpenAICompatibleOptions
handler HttpMessageHandler

Returns: VoyageProvider

View source

public override IEmbeddingModel EmbeddingModel(string modelId)

Returns an embedding model.

Parameters

Name Type Description
modelId string

Returns: IEmbeddingModel

View source

public override IImageModel ImageModel(string modelId)

Returns an image model.

Parameters

Name Type Description
modelId string

Returns: IImageModel

View source

public override ILanguageModel LanguageModel(string modelId)

Returns a language model.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

public override IRerankingModel RerankingModel(string modelId)

Returns a reranking model.

Parameters

Name Type Description
modelId string

Returns: IRerankingModel

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product