Skip to content

AmazonBedrockTools

Namespace: Vercel.AI.AmazonBedrock

public static class AmazonBedrockTools

Builds a Converse toolConfig from V4 function tools.

Inheritance: object

View source

Prepare(string, IReadOnlyList<LanguageModelTool>?, ToolChoice?, out List<CallWarning>)

Section titled “Prepare(string, IReadOnlyList<LanguageModelTool>?, ToolChoice?, out List<CallWarning>)”
public static JsonObject Prepare(string modelId, IReadOnlyList<LanguageModelTool>? tools, ToolChoice? toolChoice, out List<CallWarning> warnings)

Prepares function tools. An empty or missing list returns an empty object. Tool choice none clears the tools. A named choice keeps only that tool.

Parameters

Name Type Description
modelId string
tools IReadOnlyList<LanguageModelTool>
toolChoice ToolChoice
warnings List<CallWarning>

Returns: JsonObject

View source

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