-
-
Notifications
You must be signed in to change notification settings - Fork 7
OpenAI.Model
Andrew Lambert edited this page Jul 7, 2024
·
11 revisions
OpenAI.Model
Protected Class Model
This class represents an AI model. Refer to the OpenAI documentation on the /v1/models
endpoint for further details.
Use the Count()
and Lookup()
shared methods to list and select from the available AI models, or use the Operator_Convert()
method to create an instance of Model
from the model name as a string. Operator_Convert()
will raise an exception if the model name is invalid.
Listing and selecting from available models:
' using Count() and Lookup() to find the model you want
Dim gpt4 As OpenAI.Model
For i As Integer = 0 To OpenAI.Model.Count - 1
Dim model As OpenAI.Model = OpenAI.Model.Lookup(i)
If model.ID = "gpt-4" Then
gpt4 = model
Exit For
End If
Next
Or, calling Operator_Convert()
with the name of the model:
' converting from the name
Dim gpt4 As OpenAI.Model = "gpt-4"
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.