FileUIPart
Namespace: Vercel.AI.Ui
public sealed class FileUIPart : UIMessagePartA file part. Maps to FileUIPart.
Inheritance: object → UIMessagePart
Constructors
Section titled “Constructors”FileUIPart(string, string)
Section titled “FileUIPart(string, string)”public FileUIPart(string mediaType, string url)Creates a file part.
Parameters
| Name | Type | Description |
|---|---|---|
mediaType |
string | |
url |
string |
Properties
Section titled “Properties”Filename
Section titled “Filename”public string? Filename { get; init; }The file name.
Value: string
MediaType
Section titled “MediaType”public string MediaType { get; }IANA media type.
Value: string
ProviderMetadata
Section titled “ProviderMetadata”public IReadOnlyDictionary<string, JsonElement>? ProviderMetadata { get; init; }The provider metadata.
Value: IReadOnlyDictionary<string, JsonElement>
ProviderReference
Section titled “ProviderReference”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>
public string Url { get; }The URL, which can be a data URL.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product