You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Most capable GPT-3 model. Can do any task the other models can do, often with higher quality, longer output and better instruction-following. Also supports inserting completions within text.
/// Most capable Codex model. Particularly good at translating natural language to code. In addition to completing code, also supports inserting completions within code.
Copy file name to clipboardexpand all lines: OpenAI_API/Model/ModelsEndpoint.cs
+35-30
Original file line number
Diff line number
Diff line change
@@ -11,73 +11,77 @@
11
11
namespaceOpenAI_API
12
12
{
13
13
/// <summary>
14
-
/// The API endpoint for querying available Engines/models
14
+
/// The API endpoint for querying available models
15
15
/// </summary>
16
-
publicclassEnginesEndpoint
16
+
publicclassModelsEndpoint
17
17
{
18
18
OpenAIAPIApi;
19
19
20
20
/// <summary>
21
-
/// Constructor of the api endpoint. Rather than instantiating this yourself, access it through an instance of <see cref="OpenAIAPI"/> as <see cref="OpenAIAPI.Engines"/>.
21
+
/// Constructor of the api endpoint. Rather than instantiating this yourself, access it through an instance of <see cref="OpenAIAPI"/> as <see cref="OpenAIAPI.Models"/>.
22
22
/// </summary>
23
23
/// <param name="api"></param>
24
-
internalEnginesEndpoint(OpenAIAPIapi)
24
+
internalModelsEndpoint(OpenAIAPIapi)
25
25
{
26
26
this.Api=api;
27
27
}
28
28
29
29
/// <summary>
30
-
/// List all engines via the API
30
+
/// List all models via the API
31
31
/// </summary>
32
-
/// <returns>Asynchronously returns the list of all <see cref="Engine"/>s</returns>
33
-
publicTask<List<Engine>>GetEnginesAsync()
32
+
/// <returns>Asynchronously returns the list of all <see cref="Model"/>s</returns>
33
+
publicTask<List<Model>>GetModelsAsync()
34
34
{
35
-
returnGetEnginesAsync(Api?.Auth);
35
+
returnGetModelsAsync(Api?.Auth);
36
36
}
37
37
38
38
/// <summary>
39
-
/// Get details about a particular Engine from the API, specifically properties such as <see cref="Engine.Owner"/> and <see cref="Engine.Ready"/>
39
+
/// Get details about a particular Model from the API, specifically properties such as <see cref="Model.Owner"/> and <see cref="Model.Ready"/>
40
40
/// </summary>
41
-
/// <param name="id">The id/name of the engine to get more details about</param>
42
-
/// <returns>Asynchronously returns the <see cref="Engine"/> with all available properties</returns>
thrownewAuthenticationException("You must provide API authentication. Please refer to https://github.com/OkGoDoIt/OpenAI-API-dotnet#authentication for details.");
thrownewHttpRequestException("Error calling OpenAi API to get list of engines. HTTP status code: "+response.StatusCode.ToString()+". Content: "+resultAsString);
74
+
thrownewHttpRequestException("Error calling OpenAi API to get list of models. HTTP status code: "+response.StatusCode.ToString()+". Content: "+resultAsString);
71
75
}
72
76
}
73
77
74
78
/// <summary>
75
-
/// Get details about a particular Engine from the API, specifically properties such as <see cref="Engine.Owner"/> and <see cref="Engine.Ready"/>
79
+
/// Get details about a particular Model from the API, specifically properties such as <see cref="Model.Owner"/> and <see cref="Model.Ready"/>
76
80
/// </summary>
77
-
/// <param name="id">The id/name of the engine to get more details about</param>
81
+
/// <param name="id">The id/name of the model to get more details about</param>
78
82
/// <param name="auth">API authentication in order to call the API endpoint. If not specified, attempts to use a default.</param>
79
-
/// <returns>Asynchronously returns the <see cref="Engine"/> with all available properties</returns>
0 commit comments