Skip to content

Commit

Permalink
Rename OPEN_AI_API_KEY to OPENAI_API_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
rodion-m committed Apr 17, 2023
1 parent 036fd08 commit 505b86b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OpenAI.ChatGpt.Extensions/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using OpenAI.ChatGpt;
using OpenAI.ChatGpt.Extensions;

var client = new OpenAiClient(Environment.GetEnvironmentVariable("OPEN_AI_API_KEY")!);
var client = new OpenAiClient(Environment.GetEnvironmentVariable("OPENAI_API_KEY")!);

var testsCode = await client.GenerateTestsForCodeInFolder(
@"C:\Users\rodio\RiderProjects\OpenAI_DotNet\OpenAI",
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGpt.ConsoleExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

string LoadApiKey()
{
var key = Environment.GetEnvironmentVariable("OPEN_AI_API_KEY");
var key = Environment.GetEnvironmentVariable("OPENAI_API_KEY");
if (key is null)
{
Console.WriteLine("Please enter your OpenAI API key " +
Expand Down
2 changes: 1 addition & 1 deletion samples/ChatGpt.SpectreConsoleExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

string LoadApiKey()
{
var key = Environment.GetEnvironmentVariable("OPEN_AI_API_KEY")
var key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")
?? Console.Ask<string>("Please enter your [green]OpenAI API key[/] " +
"(you can get it from https://platform.openai.com/account/api-keys): ");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ChatCompletionsApiTests
public ChatCompletionsApiTests(ITestOutputHelper outputHelper)
{
_outputHelper = outputHelper;
_client = new OpenAiClient(Helpers.GetKeyFromEnvironment("OPEN_AI_API_KEY"));
_client = new OpenAiClient(Helpers.GetKeyFromEnvironment("OPENAI_API_KEY"));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ImagesApiTest
public ImagesApiTest(ITestOutputHelper outputHelper)
{
_outputHelper = outputHelper;
_client = new OpenAiClient(Helpers.GetKeyFromEnvironment("OPEN_AI_API_KEY"));
_client = new OpenAiClient(Helpers.GetKeyFromEnvironment("OPENAI_API_KEY"));
}

[Fact(Skip = "Images API will be removed")]
Expand Down

0 comments on commit 505b86b

Please sign in to comment.