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
Copy file name to clipboardExpand all lines: OpenAI_API/Completions/CompletionRequest.cs
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,5 @@
1
1
usingNewtonsoft.Json;
2
-
usingSystem;
3
-
usingSystem.Collections.Generic;
4
-
usingSystem.ComponentModel;
5
-
usingSystem.Data.Common;
6
2
usingSystem.Linq;
7
-
usingSystem.Runtime;
8
-
usingSystem.Text;
9
3
10
4
namespaceOpenAI_API
11
5
{
@@ -18,7 +12,7 @@ public class CompletionRequest
18
12
/// ID of the model to use. You can use <see cref="ModelsEndpoint.GetModelsAsync()"/> to see all of your available models, or use a standard model like <see cref="Model.DavinciText"/>.
Copy file name to clipboardExpand all lines: OpenAI_API/EndpointBase.cs
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@
5
5
usingSystem.IO;
6
6
usingSystem.Linq;
7
7
usingSystem.Net.Http;
8
-
usingSystem.Runtime.Serialization;
9
8
usingSystem.Security.Authentication;
10
9
usingSystem.Text;
11
10
usingSystem.Threading.Tasks;
@@ -18,17 +17,17 @@ namespace OpenAI_API
18
17
publicabstractclassEndpointBase
19
18
{
20
19
/// <summary>
21
-
///
20
+
/// The internal reference to the API, mostly used for authentication
22
21
/// </summary>
23
-
protectedreadonlyOpenAIAPIApi;
22
+
protectedreadonlyOpenAIAPI_Api;
24
23
25
24
/// <summary>
26
25
/// Constructor of the api endpoint base, to be called from the contructor of any devived classes. Rather than instantiating any endpoint yourself, access it through an instance of <see cref="OpenAIAPI"/>.
27
26
/// </summary>
28
27
/// <param name="api"></param>
29
28
internalEndpointBase(OpenAIAPIapi)
30
29
{
31
-
this.Api=api;
30
+
this._Api=api;
32
31
}
33
32
34
33
/// <summary>
@@ -43,7 +42,7 @@ protected string Url
43
42
{
44
43
get
45
44
{
46
-
return$"{Api.ApiUrlBase}{Endpoint}";
45
+
return$"{_Api.ApiUrlBase}{Endpoint}";
47
46
}
48
47
}
49
48
@@ -54,15 +53,15 @@ protected string Url
54
53
/// <exception cref="AuthenticationException">Thrown if there is no valid authentication. Please refer to <see href="https://github.com/OkGoDoIt/OpenAI-API-dotnet#authentication"/> for details.</exception>
55
54
protectedHttpClientGetClient()
56
55
{
57
-
if(Api.Auth?.ApiKeyisnull)
56
+
if(_Api.Auth?.ApiKeyisnull)
58
57
{
59
58
thrownewAuthenticationException("You must provide API authentication. Please refer to https://github.com/OkGoDoIt/OpenAI-API-dotnet#authentication for details.");
0 commit comments