Skip to content

StepFinishPart

Namespace: Vercel.AI

public sealed class StepFinishPart : TextStreamPart

A step finished.

Inheritance: object → TextStreamPart

View source

StepFinishPart(StepResult, LanguageModelResponseMetadata, string?)

Section titled “StepFinishPart(StepResult, LanguageModelResponseMetadata, string?)”
public StepFinishPart(StepResult step, LanguageModelResponseMetadata response, string? rawFinishReason = null)

Creates a step-finish part.

Parameters

Name Type Description
step StepResult
response LanguageModelResponseMetadata
rawFinishReason string

View source

public StepPerformance Performance { get; }

Performance metrics of the step. Maps to performance.

Value: StepPerformance

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata of the step. Maps to providerMetadata.

Value: JsonElement?

View source

public string? RawFinishReason { get; }

The finish reason exactly as the provider reported it, or <a href=“https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null"&gt;null&lt;/a> when the provider reported none. Maps to rawFinishReason.

Value: string

View source

public LanguageModelResponseMetadata Response { get; }

Response metadata of the step: id, model id, timestamp, and headers. Maps to response.

Value: LanguageModelResponseMetadata

View source

public StepResult Step { get; }

Completed step.

Value: StepResult

View source

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