Skip to content

OpenAI.File.Create

Andrew Lambert edited this page Feb 6, 2023 · 4 revisions

OpenAI.File.Create

Method signatures

 Shared Function Create(FileContent As FolderItem, Purpose As String, FileName As String = "") As OpenAI.File
 Shared Function Create(FileContent As MemoryBlock, Purpose As String, FileName As String) As OpenAI.File
 Shared Function Create(FileContent As OpenAI.FineTuneData, FileName As String) As OpenAI.File

Parameters

Create(FolderItem, String, String)

Name Type Comment
FileContent FolderItem The file content to upload.
Purpose String One of the approved purposes for files (currently, only "fine-tune" is approved.)
FileName String Optional. The name of the file being uploaded.

Create(MemoryBlock, String, String)

Name Type Comment
FileContent MemoryBlock The file content to upload.
Purpose String One of the approved purposes for files (currently, only "fine-tune" is approved.)
FileName String The name of the file being uploaded.

Create(FineTuneData, String)

Name Type Comment
FileContent FineTuneData The file content to upload.
FileName String The name of the file being uploaded.

Return value

A File object representing the new file on the server.

Remarks

Upload a file that contains document(s) to be used across various endpoints/features. Currently, only the FineTune endpoint accepts files.

See also

Clone this wiki locally