Skip to content

OpenAI.File.Create

Andrew Lambert edited this page Jan 1, 2024 · 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

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" or "assistants" are 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" or "assistants" are approved.)
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