AnthropicToolPreparer
Namespace: Vercel.AI.Anthropic
public static class AnthropicToolPreparerBuilds the Anthropic tools and tool_choice fields.
Inheritance: object
Methods
Section titled “Methods”Prepare(IReadOnlyList<AnthropicToolDefinition>?, string?, string?, bool?, AnthropicCacheControlValidator?, bool, bool, bool, bool)
Section titled “Prepare(IReadOnlyList<AnthropicToolDefinition>?, string?, string?, bool?, AnthropicCacheControlValidator?, bool, bool, bool, bool)”public static AnthropicPreparedTools Prepare(IReadOnlyList<AnthropicToolDefinition>? tools, string? toolChoiceType, string? toolName, bool? disableParallelToolUse, AnthropicCacheControlValidator? cacheControl = null, bool supportsStructuredOutput = false, bool supportsStrictTools = false, bool defaultEagerInputStreaming = false, bool rejectsForcedToolUse = false)Prepares tools. An empty list omits both tools and tool choice.
Parameters
| Name | Type | Description |
|---|---|---|
tools |
IReadOnlyList<AnthropicToolDefinition> | |
toolChoiceType |
string | |
toolName |
string | |
disableParallelToolUse |
bool? | |
cacheControl |
AnthropicCacheControlValidator | |
supportsStructuredOutput |
bool | |
supportsStrictTools |
bool | |
defaultEagerInputStreaming |
bool | |
rejectsForcedToolUse |
bool |
Returns: AnthropicPreparedTools
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product