PromptTool
Namespace: Vercel.AI.Prompt
public sealed class PromptToolA tool passed to String).
Inheritance: object
Constructors
Section titled “Constructors”PromptTool(string?)
Section titled “PromptTool(string?)”public PromptTool(string? type = null)Creates a function, dynamic, or provider tool.
Parameters
| Name | Type | Description |
|---|---|---|
type |
string |
Properties
Section titled “Properties”public JsonElement? Args { get; set; }Provider tool arguments.
Value: JsonElement?
Description
Section titled “Description”public string? Description { get; set; }String description.
Value: string
DescriptionFactory
Section titled “DescriptionFactory”public Func<ToolDescriptionContext, string>? DescriptionFactory { get; set; }Description resolved from context and the sandbox.
Value: Func<ToolDescriptionContext, string>
public string? Id { get; set; }Provider tool id.
Value: string
InputExamples
Section titled “InputExamples”public JsonElement? InputExamples { get; set; }Input examples.
Value: JsonElement?
InputSchema
Section titled “InputSchema”public JsonElement InputSchema { get; set; }JSON Schema for function tools.
Value: JsonElement
ProviderOptions
Section titled “ProviderOptions”public JsonElement? ProviderOptions { get; set; }Provider options.
Value: JsonElement?
Strict
Section titled “Strict”public bool? Strict { get; set; }Strict mode.
Value: bool?
public string? Type { get; }Tool type. Null, function, and dynamic are function tools. provider is provider-defined.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product