Skip to content

AssistantToolResultPart

Namespace: Vercel.AI.Provider

public sealed class AssistantToolResultPart : AssistantContentPart

A provider-executed tool result in an assistant message.

Inheritance: object → AssistantContentPart

View source

AssistantToolResultPart(string, string, ToolModelMessage, IReadOnlyDictionary<string, JsonElement>?)

Section titled “AssistantToolResultPart(string, string, ToolModelMessage, IReadOnlyDictionary<string, JsonElement>?)”
public AssistantToolResultPart(string toolCallId, string toolName, ToolModelMessage output, IReadOnlyDictionary<string, JsonElement>? providerOptions = null)

Creates a tool-result part. <code class=“paramref”>output</code> carries the output type and value.

Parameters

Name Type Description
toolCallId string
toolName string
output ToolModelMessage
providerOptions IReadOnlyDictionary<string, JsonElement>

View source

public ToolModelMessage Output { get; }

The output, as a tool message with the same call id and name. Use its OutputType and OutputJson.

Value: ToolModelMessage

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