Skip to content

AssistantFilePart

Namespace: Vercel.AI.Provider

public class AssistantFilePart : AssistantContentPart

A file in an assistant message. Maps to the assistant file part.

Inheritance: object → AssistantContentPart

Derived: AssistantReasoningFilePart

View source

AssistantFilePart(string, string?, byte[]?, string?, IReadOnlyDictionary<string, JsonElement>?)

Section titled “AssistantFilePart(string, string?, byte[]?, string?, IReadOnlyDictionary<string, JsonElement>?)”
public AssistantFilePart(string mediaType, string? url, byte[]? data, string? fileName = null, IReadOnlyDictionary<string, JsonElement>? providerOptions = null)

Creates a file part.

Parameters

Name Type Description
mediaType string IANA media type.
url string Remote URL, when the file is not inlined.
data byte[] Inline bytes.
fileName string Optional file name.
providerOptions IReadOnlyDictionary<string, JsonElement> Provider-specific options for this part.

View source

public byte[]? Data { get; }

Inline bytes.

Value: byte[]

View source

public string? FileName { get; }

Optional file name.

Value: string

View source

public string MediaType { get; }

IANA media type.

Value: string

View source

public string? Url { get; }

Remote URL, when the file is not inlined.

Value: string

View source

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