Skip to content

OpenAI.File.Lookup

Andrew Lambert edited this page Feb 7, 2023 · 2 revisions

OpenAI.File.Lookup

Method signatures

 Shared Function Lookup(Index As Integer, Refresh As Boolean = False) As OpenAI.File
 Shared Function Lookup(FileID As String, Refresh As Boolean = False) As OpenAI.File

Parameters

Lookup(Integer, Boolean)

Name Type Comment
Index Integer The index of the File to lookup.
Refresh Boolean Optional. If True then the cached file list is refreshed from the server.

Lookup(String, Boolean)

Name Type Comment
FileID String The ID of the file to lookup.
Refresh Boolean Optional. If True then the cached file list is refreshed from the server.

Return value

A File object representing one of your organization's files on the server. If the FileID is invalid then the return value will be Nil. If the Index is invalid then an OutOfBoundsException will be raised.

Remarks

Queries the list of files that your organization has uploaded. The file list is fetched once and then cached to reduce the number of API requests. The cache is invalidated if you upload or delete a file, or if you pass the True as the Refresh parameter.

See also

Clone this wiki locally