Skip to content

OpenAI.Model.Lookup

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

OpenAI.Model.Lookup

Method signature

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

Parameters

Lookup(String, Boolean)

Name Type Comment
ModelName String The name of the Model to retrieve. If no model matches the name then the return value is Nil
Refresh Boolean Optional. If True then the cached model list is refreshed from the server.

Lookup(Integer, Boolean)

Parameters

Name Type Comment
Index Integer The index of the Model to retrieve. If the index is invalid then an OutOfBoundsException will be raised.
Refresh Boolean Optional. If True then the cached model list is refreshed from the server.

Return value

An instance of OpenAI.Model representing the requested AI model.

Remarks

The model list is fetched once and then cached to reduce the number of API requests. The cache is invalidated if you pass the True as the Refresh parameter.

See also

Clone this wiki locally