Skip to content

FileUIPart

Namespace: Vercel.AI.Ui

public sealed class FileUIPart : UIMessagePart

A file part. Maps to FileUIPart.

Inheritance: object → UIMessagePart

View source

public FileUIPart(string mediaType, string url)

Creates a file part.

Parameters

Name Type Description
mediaType string
url 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 IReadOnlyDictionary<string, string>? ProviderReference { get; init; }

Map from provider name to an uploaded file id. It takes precedence over Url.

Value: IReadOnlyDictionary<string, string>

View source

public string Url { get; }

The URL, which can be a data URL.

Value: string

View source

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