Skip to content

UploadFileCall

Namespace: Vercel.AI.Operations

public sealed class UploadFileCall

Arguments forwarded to a files API.

Inheritance: object

View source

UploadFileCall(UploadData, string, string?, CancellationToken, IReadOnlyDictionary<string, string>?, JsonElement?)

Section titled “UploadFileCall(UploadData, string, string?, CancellationToken, IReadOnlyDictionary<string, string>?, JsonElement?)”
public UploadFileCall(UploadData data, string mediaType, string? filename, CancellationToken cancellationToken, IReadOnlyDictionary<string, string>? headers, JsonElement? providerOptions)

Creates an upload call.

Parameters

Name Type Description
data UploadData
mediaType string
filename string
cancellationToken CancellationToken
headers IReadOnlyDictionary<string, string>
providerOptions JsonElement?

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public UploadData Data { get; }

Tagged data.

Value: UploadData

View source

public string? Filename { get; }

Optional filename.

Value: string

View source

public IReadOnlyDictionary<string, string>? Headers { get; }

Request headers.

Value: IReadOnlyDictionary<string, string>

View source

public string MediaType { get; }

Media type sent to the provider.

Value: string

View source

public JsonElement? ProviderOptions { get; }

Provider options. Null when the caller omitted them.

Value: JsonElement?

View source

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