Skip to content

AnthropicPreparedRequest

Namespace: Vercel.AI.Anthropic

public sealed class AnthropicPreparedRequest

A Messages request body plus the betas and warnings that go with it.

Inheritance: object

View source

AnthropicPreparedRequest(JsonObject, IReadOnlyList<AnthropicWarning>, IReadOnlyList<string>, bool, string, bool)

Section titled “AnthropicPreparedRequest(JsonObject, IReadOnlyList<AnthropicWarning>, IReadOnlyList<string>, bool, string, bool)”
public AnthropicPreparedRequest(JsonObject body, IReadOnlyList<AnthropicWarning> warnings, IReadOnlyList<string> betas, bool usesJsonResponseTool, string providerOptionsName, bool usedCustomProviderKey)

Creates a prepared request.

Parameters

Name Type Description
body JsonObject
warnings IReadOnlyList<AnthropicWarning>
betas IReadOnlyList<string>
usesJsonResponseTool bool
providerOptionsName string
usedCustomProviderKey bool

View source

public IReadOnlyList<string> Betas { get; }

Beta names for the anthropic-beta header.

Value: IReadOnlyList<string>

View source

public JsonObject Body { get; }

JSON body.

Value: JsonObject

View source

public string ProviderOptionsName { get; }

Provider-options key derived from the provider name.

Value: string

View source

public bool UsedCustomProviderKey { get; }

True when a custom provider-options key was present.

Value: bool

View source

public bool UsesJsonResponseTool { get; }

True when structured output is sent as the json tool.

Value: bool

View source

public IReadOnlyList<AnthropicWarning> Warnings { get; }

Preparation warnings.

Value: IReadOnlyList<AnthropicWarning>

View source

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