Skip to content

DataUIPart

Namespace: Vercel.AI.Ui

public sealed class DataUIPart : UIMessagePart

A data part. Its type is data-{name}. Maps to DataUIPart.

Inheritance: object → UIMessagePart

View source

public DataUIPart(string name, JsonElement data)

Creates a data part named <code class=“paramref”>name</code>.

Parameters

Name Type Description
name string
data JsonElement

View source

public JsonElement Data { get; }

The data.

Value: JsonElement

View source

public string? Id { get; init; }

The part id.

Value: string

View source

public string Name { get; }

The data name, without the data- prefix.

Value: string

View source

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