Skip to content

MiniMaxProvider

Namespace: Vercel.AI.MiniMax

public sealed class MiniMaxProvider : ProviderBase

MiniMax provider. Speaks the Anthropic Messages protocol at https://api.minimax.io/anthropic/v1.

Inheritance: object → ProviderBase

View source

MiniMaxProvider(HttpClient, MiniMaxOptions?)

Section titled “MiniMaxProvider(HttpClient, MiniMaxOptions?)”
public MiniMaxProvider(HttpClient httpClient, MiniMaxOptions? options = null)

Creates a provider.

Parameters

Name Type Description
httpClient HttpClient
options MiniMaxOptions

View source

public const string ApiKeyVariable = "MINIMAX_API_KEY"

Environment variable for the API key.

Value: string

View source

public const string DefaultBaseUrl = "https://api.minimax.io/anthropic/v1"

Default API origin.

Value: string

View source

public const string ProviderId = "minimax"

Provider id.

Value: string

View source

public MiniMaxOptions Options { get; }

Options.

Value: MiniMaxOptions

View source

public MiniMaxChatLanguageModel Chat(string modelId)

Creates a MiniMax chat model for text generation.

Parameters

Name Type Description
modelId string

Returns: MiniMaxChatLanguageModel

View source

Create(MiniMaxOptions?, HttpMessageHandler?)

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

Creates a provider. Pass a handler from tests.

Parameters

Name Type Description
options MiniMaxOptions
handler HttpMessageHandler

Returns: MiniMaxProvider

View source

public override ILanguageModel LanguageModel(string modelId)

Returns a language model.

Parameters

Name Type Description
modelId string

Returns: ILanguageModel

View source

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