Skip to content

ToolExecutionEndEvent

Namespace: Vercel.AI

public sealed class ToolExecutionEndEvent : ToolExecutionStartEvent

Passed to OnToolExecutionEnd after a tool ran.

Inheritance: object → ToolExecutionStartEvent

View source

ToolExecutionEndEvent(GeneratedToolCall, IReadOnlyList<ModelMessage>, ExecutedTool, TimeSpan)

Section titled “ToolExecutionEndEvent(GeneratedToolCall, IReadOnlyList<ModelMessage>, ExecutedTool, TimeSpan)”
public ToolExecutionEndEvent(GeneratedToolCall toolCall, IReadOnlyList<ModelMessage> messages, ExecutedTool toolOutput, TimeSpan toolExecutionTime)

Creates an event.

Parameters

Name Type Description
toolCall GeneratedToolCall
messages IReadOnlyList<ModelMessage>
toolOutput ExecutedTool
toolExecutionTime TimeSpan

View source

public TimeSpan ToolExecutionTime { get; }

Time the tool took. Maps to toolExecutionMs.

Value: TimeSpan

View source

public ExecutedTool ToolOutput { get; }

The result of the call. IsError is set when the tool threw.

Value: ExecutedTool

View source

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