Skip to content

PromptTool

Namespace: Vercel.AI.Prompt

public sealed class PromptTool

A tool passed to String).

Inheritance: object

View source

public PromptTool(string? type = null)

Creates a function, dynamic, or provider tool.

Parameters

Name Type Description
type string

View source

public JsonElement? Args { get; set; }

Provider tool arguments.

Value: JsonElement?

View source

public string? Description { get; set; }

String description.

Value: string

View source

public Func<ToolDescriptionContext, string>? DescriptionFactory { get; set; }

Description resolved from context and the sandbox.

Value: Func<ToolDescriptionContext, string>

View source

public string? Id { get; set; }

Provider tool id.

Value: string

View source

public JsonElement? InputExamples { get; set; }

Input examples.

Value: JsonElement?

View source

public JsonElement InputSchema { get; set; }

JSON Schema for function tools.

Value: JsonElement

View source

public JsonElement? ProviderOptions { get; set; }

Provider options.

Value: JsonElement?

View source

public bool? Strict { get; set; }

Strict mode.

Value: bool?

View source

public string? Type { get; }

Tool type. Null, function, and dynamic are function tools. provider is provider-defined.

Value: string

View source

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