Skip to content

Commit 83aa25b

Browse files
author
Nils Clauß
committed
Fix identation
1 parent 627edd1 commit 83aa25b

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

OpenAI_API/EndpointBase.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,27 @@ protected string Url
4848
}
4949
}
5050

51-
/// <summary>
52-
/// Gets the version of the endpoint as url parameter, based on the configuration in the api definition. For example "https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#rest-api-versioning"
53-
/// </summary>
54-
protected string ApiVersionParameter
55-
{
56-
get
57-
{
58-
if(string.IsNullOrEmpty(_Api.ApiVersion))
51+
/// <summary>
52+
/// Gets the version of the endpoint as url parameter, based on the configuration in the api definition. For example "https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#rest-api-versioning"
53+
/// </summary>
54+
protected string ApiVersionParameter
55+
{
56+
get
57+
{
58+
if(string.IsNullOrEmpty(_Api.ApiVersion))
5959
{
6060
return "";
6161
}
6262
return $"api-version={_Api.ApiVersion}";
63-
}
64-
}
65-
66-
/// <summary>
67-
/// Gets an HTTPClient with the appropriate authorization and other headers set
68-
/// </summary>
69-
/// <returns>The fully initialized HttpClient</returns>
70-
/// <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>
71-
protected HttpClient GetClient()
63+
}
64+
}
65+
66+
/// <summary>
67+
/// Gets an HTTPClient with the appropriate authorization and other headers set
68+
/// </summary>
69+
/// <returns>The fully initialized HttpClient</returns>
70+
/// <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>
71+
protected HttpClient GetClient()
7272
{
7373
if (_Api.Auth?.ApiKey is null)
7474
{
@@ -79,7 +79,7 @@ protected HttpClient GetClient()
7979
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _Api.Auth.ApiKey);
8080
// Further authentication-header used for Azure openAI service
8181
client.DefaultRequestHeaders.Add("api-key", _Api.Auth.ApiKey);
82-
client.DefaultRequestHeaders.Add("User-Agent", Value);
82+
client.DefaultRequestHeaders.Add("User-Agent", Value);
8383
if (!string.IsNullOrEmpty(_Api.Auth.OpenAIOrganization)) client.DefaultRequestHeaders.Add("OpenAI-Organization", _Api.Auth.OpenAIOrganization);
8484

8585
return client;

OpenAI_API/OpenAIAPI.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ public class OpenAIAPI
1515
/// </summary>
1616
public string ApiUrlBase = "https://api.openai.com/v1/";
1717

18-
/// <summary>
19-
/// Version of the Rest Api. Needed for e.g. for the Azure OpenAI service.
20-
/// </summary>
21-
public string ApiVersion { get; set; }
18+
/// <summary>
19+
/// Version of the Rest Api. Needed for e.g. for the Azure OpenAI service.
20+
/// </summary>
21+
public string ApiVersion { get; set; }
2222

23-
/// <summary>
24-
/// The API authentication information to use for API calls
25-
/// </summary>
26-
public APIAuthentication Auth { get; set; }
23+
/// <summary>
24+
/// The API authentication information to use for API calls
25+
/// </summary>
26+
public APIAuthentication Auth { get; set; }
2727

2828
/// <summary>
2929
/// Creates a new entry point to the OpenAPI API, handling auth and allowing access to the various API endpoints

0 commit comments

Comments
 (0)