FileObject

data class FileObject(val id: String, val bytes: Int, val createdAt: Int, val fileName: String, val purpose: FilePurpose)

Represents a file uploaded to the OpenAI API.

Constructors

Link copied to clipboard
constructor(id: String, bytes: Int, createdAt: Int, fileName: String, purpose: FilePurpose)

Create empty File object

Functions

Link copied to clipboard

Returns the Instant time that this file object was created. The time is measured as a unix timestamp (measured in seconds since 00:00:00 UTC on January 1, 1970).

Link copied to clipboard
fun getZonedTime(timezone: ZoneId = TimeZone.getDefault().toZoneId()): ZonedDateTime

Returns the time-zoned instant that this file object was created. By default, this method uses the system's timezone.

Properties

Link copied to clipboard
val bytes: Int

How large the file is in bytes

Link copied to clipboard

The unix timestamp this file wrapper was created

Link copied to clipboard

The name of the file (with the extension at the end)

Link copied to clipboard
val id: String

The unique id of the file

Link copied to clipboard

The reason this file was uploaded