Skip to content

TextStreamPart

Namespace: Vercel.AI.Util

public sealed class TextStreamPart

One part of a model text stream.

Inheritance: object

View source

TextStreamPart(string, string?, string?, string?)

Section titled “TextStreamPart(string, string?, string?, string?)”
public TextStreamPart(string type, string? id = null, string? text = null, string? delta = null)

Creates a part.

Parameters

Name Type Description
type string
id string
text string
delta string

View source

public string? Delta { get; }

Delta carried by provider stream parts that use delta instead of text.

Value: string

View source

public string? Id { get; }

Part id.

Value: string

View source

public string? Text { get; }

Text carried by a text-delta part.

Value: string

View source

public string Type { get; }

Part kind, such as text-delta.

Value: string

View source

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