Skip to content

Commit

Permalink
useopenai ENV change
Browse files Browse the repository at this point in the history
  • Loading branch information
spboyer committed Apr 25, 2024
1 parent 1d806dc commit e924ede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: eShop Build, Provision, and Deploy to Azure

on:
workflow_dispatch:
push:
Expand All @@ -21,7 +23,7 @@ jobs:
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
AI__USE_OPENAI : ${{ vars.USE_OPENAI }}
ConnectionStrings__openai: Endpoint=${{ vars.OPEN }};Key=${{ secrets.OPENKEY }}
ConnectionStrings__openai: Endpoint=${{ vars.OPEN_ENDPOINT }};Key=${{ secrets.OPENKEY }}
AI__OPENAI__EMBEDDINGNAME: ${{ vars.EMBEDDINGNAME }}
AI__OPENAI__CHATMODEL: ${{ vars.CHATMODEL }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion src/eShop.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
.WithReference(appInsights);

// set to true if you want to use OpenAI
bool useOpenAI = false;
bool useOpenAI = Convert.ToBoolean(Environment.GetEnvironmentVariable("AI__USE_OPENAI"));
if (useOpenAI)
{
const string openAIName = "openai";
Expand Down

0 comments on commit e924ede

Please sign in to comment.