ToolResultStreamPart
Namespace: Vercel.AI.Provider
public sealed class ToolResultStreamPart : LanguageModelStreamPartA tool result the provider reported.
Inheritance: object → LanguageModelStreamPart
Constructors
Section titled “Constructors”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 |
Properties
Section titled “Properties”IsError
Section titled “IsError”public bool IsError { get; init; }Whether the tool failed. Result then holds the error.
Value: bool
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; init; }Provider metadata for this result, keyed by provider name.
Value: JsonElement?
Result
Section titled “Result”public JsonElement Result { get; }Result value.
Value: JsonElement
ToolCallId
Section titled “ToolCallId”public string ToolCallId { get; }Matching tool call id.
Value: string
ToolName
Section titled “ToolName”public string ToolName { get; }Tool name.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product