Skip to content

Commit 8ec405b

Browse files
committed
Merge branch 'master' of https://github.com/srcnalt/OpenAI-Unity
2 parents 2493839 + 58e488c commit 8ec405b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Runtime/Interfaces/IResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace OpenAI
22
{
33
public interface IResponse
44
{
5-
public ApiError Error { get; set; }
5+
ApiError Error { get; set; }
66
}
77
}

Runtime/OpenAIApi.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,20 @@ public class OpenAIApi
1515
/// Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps).
1616
/// Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.
1717
/// </summary>
18-
private Configuration configuration;
19-
private Configuration Configuration => configuration ??= new Configuration();
18+
private Configuration configuration;
19+
20+
private Configuration Configuration
21+
{
22+
get
23+
{
24+
if (configuration == null)
25+
{
26+
configuration = new Configuration();
27+
}
28+
29+
return configuration;
30+
}
31+
}
2032

2133
/// OpenAI API base path for requests.
2234
private const string BASE_PATH = "https://api.openai.com/v1";

0 commit comments

Comments
 (0)