-
-
Notifications
You must be signed in to change notification settings - Fork 6
OpenAI.File
Andrew Lambert edited this page Dec 24, 2023
·
14 revisions
OpenAI.File
Protected Class File
Inherits OpenAI.Response
This class represents an API file response. Refer to the OpenAI documentation on the /v1/files
endpoint for further details.
This example uploads a file.
OpenAI.APIKey = "YOUR KEY HERE"
Dim f As FolderItem = SpecialFolder.Desktop.Child("training.jsonl")
Dim file As OpenAI.File = OpenAI.File.Create(f) ' upload
This example downloads a previously-created file.
OpenAI.APIKey = "YOUR KEY HERE"
Dim file As OpenAI.File = OpenAI.File.Lookup(0) ' get the first known file
Dim content As String = file.GetResult() ' download
This example deletes a previously-created file.
OpenAI.APIKey = "YOUR KEY HERE"
Dim file As OpenAI.File = OpenAI.File.Lookup(0) ' get the first known file
file.Delete()
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2023-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.