Skip to content

TextUIPart

Namespace: Vercel.AI.Ui

public sealed class TextUIPart : UIMessagePart

A text part. Maps to TextUIPart.

Inheritance: object → UIMessagePart

View source

public TextUIPart(string text)

Creates a text part.

Parameters

Name Type Description
text string

View source

public IReadOnlyDictionary<string, JsonElement>? ProviderMetadata { get; init; }

The provider metadata.

Value: IReadOnlyDictionary<string, JsonElement>

View source

public string? State { get; init; }

The state of the text part: streaming or done.

Value: string

View source

public string Text { get; }

The text content.

Value: string

View source

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