Skip to content

AnthropicMessagesRequest

Namespace: Vercel.AI.Anthropic

public static class AnthropicMessagesRequest

Builds an Anthropic Messages request from SDK call options.

Inheritance: object

View source

Prepare(string, LanguageModelCallOptions, bool, string, bool, bool, AnthropicModelSettings?)

Section titled “Prepare(string, LanguageModelCallOptions, bool, string, bool, bool, AnthropicModelSettings?)”
public static AnthropicPreparedRequest Prepare(string modelId, LanguageModelCallOptions options, bool stream, string providerName, bool supportsNativeStructuredOutput = true, bool supportsStrictTools = true, AnthropicModelSettings? settings = null)

Prepares the request. <code class=“paramref”>stream</code> adds stream: true and eager tool streaming. Hosts without the output format or strict tools turn them off with the last two flags.

Parameters

Name Type Description
modelId string
options LanguageModelCallOptions
stream bool
providerName string
supportsNativeStructuredOutput bool
supportsStrictTools bool
settings AnthropicModelSettings

Returns: AnthropicPreparedRequest

View source

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