Skip to content

ErrorStreamPart

Namespace: Vercel.AI.Provider

public sealed class ErrorStreamPart : LanguageModelStreamPart

A stream error from the provider.

Inheritance: object → LanguageModelStreamPart

View source

public ErrorStreamPart(string message)

Creates an error part.

Parameters

Name Type Description
message string

View source

public ErrorStreamPart(ProviderStreamError error)

Creates an error part that carries the provider’s structured error.

Parameters

Name Type Description
error ProviderStreamError

View source

public ProviderStreamError? Error { get; }

The provider’s structured error (type, code, status, retry flag, and the original data). Null when the provider reported only a message.

Value: ProviderStreamError

View source

public string Message { get; }

Error message.

Value: string

View source

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