Skip to content

ToolInputStartPart

Namespace: Vercel.AI

public sealed class ToolInputStartPart : TextStreamPart

The model started streaming tool input.

Inheritance: object → TextStreamPart

View source

ToolInputStartPart(string, string, JsonElement?, bool?, bool, ToolInputEncoding?, string?)

Section titled “ToolInputStartPart(string, string, JsonElement?, bool?, bool, ToolInputEncoding?, string?)”
public ToolInputStartPart(string id, string toolName, JsonElement? providerMetadata, bool? providerExecuted, bool dynamic, ToolInputEncoding? inputEncoding = null, string? title = null)

Creates a tool-input-start part.

Parameters

Name Type Description
id string
toolName string
providerMetadata JsonElement?
providerExecuted bool?
dynamic bool
inputEncoding ToolInputEncoding?
title string

View source

public bool Dynamic { get; }

True for a tool the caller did not declare, or a dynamic tool.

Value: bool

View source

public string Id { get; }

Tool call id.

Value: string

View source

public ToolInputEncoding? InputEncoding { get; }

Encoding of the input deltas. Defaults to JSON when <a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null"&gt;null&lt;/a>.

Value: ToolInputEncoding?

View source

public bool? ProviderExecuted { get; }

True when the provider executes the tool.

Value: bool?

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata for this tool input.

Value: JsonElement?

View source

public string? Title { get; }

Display title of the tool. Maps to title.

Value: string

View source

public IReadOnlyDictionary<string, JsonElement>? ToolMetadata { get; init; }

Metadata of the tool, apart from provider metadata. Maps to the part’s toolMetadata.

Value: IReadOnlyDictionary<string, JsonElement>

View source

public string ToolName { get; }

Tool name.

Value: string

View source

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