Skip to content

LanguageModelFilePart

Namespace: Vercel.AI.Prompt

public sealed class LanguageModelFilePart

A file part in the v4 provider prompt. Maps to the result of convertToLanguageModelV4FilePart.

Inheritance: object

View source

public LanguageModelFilePart(string dataType, string? mediaType)

Creates a part.

Parameters

Name Type Description
dataType string
mediaType string

View source

public string? Base64 { get; set; }

Inline base64 text.

Value: string

View source

public byte[]? Bytes { get; set; }

Inline bytes.

Value: byte[]

View source

public string DataType { get; }

data, url, reference, or text.

Value: string

View source

public string? MediaType { get; }

Media type extracted from a data URL.

Value: string

View source

public string? OriginalUrl { get; set; }

Original URL string when parsing changed it.

Value: string

View source

public IReadOnlyDictionary<string, string>? Reference { get; set; }

Provider reference.

Value: IReadOnlyDictionary<string, string>

View source

public string? Text { get; set; }

Text payload.

Value: string

View source

public Uri? Url { get; set; }

URL.

Value: Uri

View source

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