Skip to content

XaiFileResult

Namespace: Vercel.AI.Xai

public sealed class XaiFileResult

Result of an xAI file upload or metadata read.

Inheritance: object

View source

XaiFileResult(IReadOnlyDictionary<string, string>, XaiFileMetadata, string?, string?, long?, DateTimeOffset?, DateTimeOffset?)

Section titled “XaiFileResult(IReadOnlyDictionary<string, string>, XaiFileMetadata, string?, string?, long?, DateTimeOffset?, DateTimeOffset?)”
public XaiFileResult(IReadOnlyDictionary<string, string> providerReference, XaiFileMetadata metadata, string? fileName, string? mediaType, long? byteSize, DateTimeOffset? createdAt, DateTimeOffset? expiresAt)

Creates a file result.

Parameters

Name Type Description
providerReference IReadOnlyDictionary<string, string>
metadata XaiFileMetadata
fileName string
mediaType string
byteSize long?
createdAt DateTimeOffset?
expiresAt DateTimeOffset?

View source

public long? ByteSize { get; }

Size in bytes, when the response includes it.

Value: long?

View source

public DateTimeOffset? CreatedAt { get; }

Creation time.

Value: DateTimeOffset?

View source

public DateTimeOffset? ExpiresAt { get; }

Expiration time.

Value: DateTimeOffset?

View source

public string? FileName { get; }

File name from the response, or the name that was uploaded.

Value: string

View source

public string? MediaType { get; }

Media type supplied by the caller.

Value: string

View source

public XaiFileMetadata Metadata { get; }

Response fields. Fields the response did not return are null.

Value: XaiFileMetadata

View source

public IReadOnlyDictionary<string, string> ProviderReference { get; }

Reference containing the xai file id.

Value: IReadOnlyDictionary<string, string>

View source

public IReadOnlyList<ModelWarning> Warnings { get; }

Always empty.

Value: IReadOnlyList<ModelWarning>

View source

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