Skip to content

Commit 1ffc833

Browse files
fixing a bug for checking if to use Azure Open AI (#277)
## Purpose <!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? --> * ... ## Does this introduce a breaking change? <!-- Mark one with an "x". --> ``` [ ] Yes [ ] No ``` ## Pull Request Type What kind of change does this Pull Request introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe: ``` ## How to Test * Get the code ``` git clone [repo-address] cd [repo-name] git checkout [branch-name] npm install ``` * Test the code <!-- Add steps to run the tests suite and/or manually test --> ``` ``` ## What to Check Verify that the following are valid * ... ## Other Information <!-- Add any other helpful information that may be needed here. --> --------- Co-authored-by: Xiaoyun Zhang <[email protected]>
1 parent 4e6782a commit 1ffc833

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/prepdocs/PrepareDocs/Program.Clients.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ private static Task<OpenAIClient> GetOpenAIClientAsync(AppOptions options) =>
166166
{
167167
if (s_openAIClient is null)
168168
{
169-
var useAOAI = Environment.GetEnvironmentVariable("UseAOAI") == "true";
169+
var useAOAI = Environment.GetEnvironmentVariable("USE_AOAI") == "true";
170170
if (!useAOAI)
171171
{
172172
var openAIApiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY");
173+
Console.WriteLine("useAOAI value is: " + useAOAI.ToString());
173174
ArgumentNullException.ThrowIfNullOrEmpty(openAIApiKey);
174175
s_openAIClient = new OpenAIClient(openAIApiKey);
175176
}

0 commit comments

Comments
 (0)