ToolExecutionEndEvent
Namespace: Vercel.AI
public sealed class ToolExecutionEndEvent : ToolExecutionStartEventPassed to OnToolExecutionEnd after a tool ran.
Inheritance: object → ToolExecutionStartEvent
Constructors
Section titled “Constructors”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 |
Properties
Section titled “Properties”ToolExecutionTime
Section titled “ToolExecutionTime”public TimeSpan ToolExecutionTime { get; }Time the tool took. Maps to toolExecutionMs.
Value: TimeSpan
ToolOutput
Section titled “ToolOutput”public ExecutedTool ToolOutput { get; }The result of the call. IsError is set when the tool threw.
Value: ExecutedTool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product