Skip to content

ToolResultStreamPart

Namespace: Vercel.AI.Provider

public sealed class ToolResultStreamPart : LanguageModelStreamPart

A tool result the provider reported.

Inheritance: object → LanguageModelStreamPart

View source

ToolResultStreamPart(string, string, JsonElement)

Section titled “ToolResultStreamPart(string, string, JsonElement)”
public ToolResultStreamPart(string toolCallId, string toolName, JsonElement result)

Creates a tool-result part.

Parameters

Name Type Description
toolCallId string
toolName string
result JsonElement

View source

public bool IsError { get; init; }

Whether the tool failed. Result then holds the error.

Value: bool

View source

public JsonElement? ProviderMetadata { get; init; }

Provider metadata for this result, keyed by provider name.

Value: JsonElement?

View source

public JsonElement Result { get; }

Result value.

Value: JsonElement

View source

public string ToolCallId { get; }

Matching tool call id.

Value: string

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