Table of Contents

Class FileResponse

Namespace
OpenAI.Files
Assembly
OpenAI-DotNet.dll

The File object represents a document that has been uploaded to OpenAI.

public sealed class FileResponse : BaseResponse
Inheritance
FileResponse
Inherited Members

Properties

Bytes

[JsonIgnore]
public int? Bytes { get; }

Property Value

int?

CreatedAt

[JsonIgnore]
public DateTime CreatedAt { get; }

Property Value

DateTime

CreatedAtUnixTimeSeconds

The Unix timestamp (in seconds) for when the file was created.

[JsonInclude]
[JsonPropertyName("created_at")]
public int CreatedAtUnixTimeSeconds { get; }

Property Value

int

FileName

The name of the file.

[JsonInclude]
[JsonPropertyName("filename")]
public string FileName { get; }

Property Value

string

Id

The file identifier, which can be referenced in the API endpoints.

[JsonInclude]
[JsonPropertyName("id")]
public string Id { get; }

Property Value

string

Object

The object type, which is always 'file'.

[JsonInclude]
[JsonPropertyName("object")]
public string Object { get; }

Property Value

string

Purpose

The intended purpose of the file. Supported values are 'fine-tune', 'fine-tune-results', 'assistants', and 'assistants_output'.

[JsonInclude]
[JsonPropertyName("purpose")]
public string Purpose { get; }

Property Value

string

Size

The size of the file, in bytes.

[JsonInclude]
[JsonPropertyName("bytes")]
public int? Size { get; }

Property Value

int?

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator string(FileResponse)

public static implicit operator string(FileResponse fileData)

Parameters

fileData FileResponse

Returns

string