Skip to content

Commit 9c0ae84

Browse files
Merge pull request #650 from microsoft/psl-v4envvariablechanges
fix: added the RAI model variable and removed the other variable
2 parents 0a3069d + df4d4cc commit 9c0ae84

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

infra/main.bicep

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,10 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
12311231
}
12321232
{
12331233
name: 'AZURE_OPENAI_DEPLOYMENT_NAME'
1234+
value: aiFoundryAiServicesModelDeployment.name
1235+
}
1236+
{
1237+
name: 'AZURE_OPENAI_RAI_DEPLOYMENT_NAME'
12341238
value: aiFoundryAiServices4_1ModelDeployment.name
12351239
}
12361240
{
@@ -1329,10 +1333,6 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
13291333
name: 'AZURE_STORAGE_BLOB_URL'
13301334
value: avmStorageAccount.outputs.serviceEndpoints.blob
13311335
}
1332-
{
1333-
name: 'AZURE_AI_MODEL_DEPLOYMENT_NAME'
1334-
value: aiFoundryAiServicesModelDeployment.name
1335-
}
13361336
{
13371337
name: 'AZURE_AI_PROJECT_ENDPOINT'
13381338
value: aiFoundryAiProjectEndpoint
@@ -1786,13 +1786,13 @@ output COSMOSDB_CONTAINER string = cosmosDbDatabaseMemoryContainerName
17861786
output AZURE_OPENAI_ENDPOINT string = 'https://${aiFoundryAiServicesResourceName}.openai.azure.com/'
17871787
output AZURE_OPENAI_MODEL_NAME string = aiFoundryAiServicesModelDeployment.name
17881788
output AZURE_OPENAI_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDeployment.name
1789+
output AZURE_OPENAI_RAI_DEPLOYMENT_NAME string = aiFoundryAiServices4_1ModelDeployment.name
17891790
output AZURE_OPENAI_API_VERSION string = azureopenaiVersion
17901791
// output APPLICATIONINSIGHTS_INSTRUMENTATION_KEY string = applicationInsights.outputs.instrumentationKey
17911792
// output AZURE_AI_PROJECT_ENDPOINT string = aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
17921793
output AZURE_AI_SUBSCRIPTION_ID string = subscription().subscriptionId
17931794
output AZURE_AI_RESOURCE_GROUP string = resourceGroup().name
17941795
output AZURE_AI_PROJECT_NAME string = aiFoundryAiProjectName
1795-
output AZURE_AI_MODEL_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDeployment.name
17961796
// output APPLICATIONINSIGHTS_CONNECTION_STRING string = applicationInsights.outputs.connectionString
17971797
output AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDeployment.name
17981798
// output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiProjectEndpoint

src/backend/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ AZURE_AI_PROJECT_ENDPOINT=
1212
AZURE_AI_SUBSCRIPTION_ID=
1313
AZURE_AI_RESOURCE_GROUP=
1414
AZURE_AI_PROJECT_NAME=
15-
AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o
1615
APPLICATIONINSIGHTS_CONNECTION_STRING=
1716
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=gpt-4o
17+
AZURE_OPENAI_RAI_DEPLOYMENT_NAME=
1818
AZURE_COGNITIVE_SERVICES="https://cognitiveservices.azure.com/.default"
1919
AZURE_AI_AGENT_ENDPOINT=
2020
# AZURE_BING_CONNECTION_NAME=

src/backend/common/config/app_config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ def __init__(self):
3333
"APPLICATIONINSIGHTS_CONNECTION_STRING"
3434
)
3535
self.APP_ENV = self._get_required("APP_ENV", "prod")
36-
# self.AZURE_AI_MODEL_DEPLOYMENT_NAME = self._get_required(
37-
# "AZURE_AI_MODEL_DEPLOYMENT_NAME", "gpt-4o"
38-
# )
3936

4037
self.AZURE_COGNITIVE_SERVICES = self._get_optional(
4138
"AZURE_COGNITIVE_SERVICES", "https://cognitiveservices.azure.com/.default"
@@ -49,6 +46,10 @@ def __init__(self):
4946
self.AZURE_OPENAI_DEPLOYMENT_NAME = self._get_required(
5047
"AZURE_OPENAI_DEPLOYMENT_NAME", "gpt-4o"
5148
)
49+
50+
self.AZURE_OPENAI_RAI_DEPLOYMENT_NAME = self._get_required(
51+
"AZURE_OPENAI_RAI_DEPLOYMENT_NAME", "gpt-4.1"
52+
)
5253
self.AZURE_OPENAI_API_VERSION = self._get_required(
5354
"AZURE_OPENAI_API_VERSION", "2024-11-20"
5455
)

src/backend/common/utils/utils_af.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def create_RAI_agent(
6161
"Respond with 'TRUE' if the input violates any rules and should be blocked, otherwise respond with 'FALSE'."
6262
)
6363

64-
model_deployment_name = config.AZURE_OPENAI_DEPLOYMENT_NAME
64+
model_deployment_name = config.AZURE_OPENAI_RAI_DEPLOYMENT_NAME
6565
team.team_id = "rai_team" # Use a fixed team ID for RAI agent
6666
team.name = "RAI Team"
6767
team.description = "Team responsible for Responsible AI checks"

0 commit comments

Comments
 (0)