Skip to content

MiniMaxChatLanguageModel

Namespace: Vercel.AI.MiniMax

public sealed class MiniMaxChatLanguageModel : AnthropicLanguageModel, ILanguageModel

MiniMax chat language model. Reuses the Anthropic Messages adapter and adds the M3.1 and later capabilities.

Inheritance: object → AnthropicLanguageModel

Implements: ILanguageModel

View source

MiniMaxChatLanguageModel(AnthropicProvider, string)

Section titled “MiniMaxChatLanguageModel(AnthropicProvider, string)”
public MiniMaxChatLanguageModel(AnthropicProvider provider, string modelId)

Creates a model.

Parameters

Name Type Description
provider AnthropicProvider
modelId string

View source

public override IReadOnlyDictionary<string, string> SupportedUrls { get; }

URL patterns the model accepts for images and PDFs.

Value: IReadOnlyDictionary<string, string>

View source

Deserialize(SerializedModelOptions, string?, HttpMessageHandler?)

Section titled “Deserialize(SerializedModelOptions, string?, HttpMessageHandler?)”
public static MiniMaxChatLanguageModel Deserialize(SerializedModelOptions serialized, string? apiKey = null, HttpMessageHandler? handler = null)

Restores a model from Serialize(). Maps to [WORKFLOW_DESERIALIZE].

Parameters

Name Type Description
serialized SerializedModelOptions The serialized model id and config.
apiKey string API key. Defaults to the MINIMAX_API_KEY environment variable.
handler HttpMessageHandler HTTP handler. Pass one from tests.

Returns: MiniMaxChatLanguageModel

View source

PrepareCallOptions(LanguageModelCallOptions, IList<AnthropicWarning>)

Section titled “PrepareCallOptions(LanguageModelCallOptions, IList<AnthropicWarning>)”
protected override LanguageModelCallOptions PrepareCallOptions(LanguageModelCallOptions options, IList<AnthropicWarning> warnings)

Lets a compatible provider rewrite the call options before the request is built. Warnings added to <code class=“paramref”>warnings</code> are reported after the request’s own warnings.

Parameters

Name Type Description
options LanguageModelCallOptions
warnings IList<AnthropicWarning>

Returns: LanguageModelCallOptions

View source

public SerializedModelOptions Serialize()

Serializes the model id and config for a workflow boundary. Maps to [WORKFLOW_SERIALIZE]. The API key is not part of the serialized config. Pass it to HttpMessageHandler).

Returns: SerializedModelOptions

View source

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