Skip to content

SourceDocumentUIPart

Namespace: Vercel.AI.Ui

public sealed class SourceDocumentUIPart : UIMessagePart

A source that is a document. Maps to SourceDocumentUIPart.

Inheritance: object → UIMessagePart

View source

SourceDocumentUIPart(string, string, string)

Section titled “SourceDocumentUIPart(string, string, string)”
public SourceDocumentUIPart(string sourceId, string mediaType, string title)

Creates a source document part.

Parameters

Name Type Description
sourceId string
mediaType string
title string

View source

public string? Filename { get; init; }

The file name.

Value: string

View source

public string MediaType { get; }

IANA media type.

Value: string

View source

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

The provider metadata.

Value: IReadOnlyDictionary<string, JsonElement>

View source

public string SourceId { get; }

The source id.

Value: string

View source

public string Title { get; }

The title.

Value: string

View source

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