Table of Contents

Class FileUploadRequest

Namespace
OpenAI.Files
Assembly
OpenAI-DotNet.dll
public sealed class FileUploadRequest : IDisposable
Inheritance
FileUploadRequest
Implements
Inherited Members

Constructors

FileUploadRequest(Stream, string, string)

Constructor.

public FileUploadRequest(Stream stream, string fileName, string purpose)

Parameters

stream Stream

The file contents to upload.

fileName string

The file name.

purpose string

The intended purpose of the uploaded documents. If the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.

Exceptions

InvalidOperationException

FileUploadRequest(string, string)

Constructor.

public FileUploadRequest(string filePath, string purpose)

Parameters

filePath string

Local file path to upload.

purpose string

The intended purpose of the uploaded documents. If the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.

Exceptions

FileNotFoundException
InvalidOperationException

Properties

File

public Stream File { get; }

Property Value

Stream

FileName

public string FileName { get; }

Property Value

string

Purpose

public string Purpose { get; }

Property Value

string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~FileUploadRequest()

protected ~FileUploadRequest()