Skip to content

Commit 9466a21

Browse files
Merge remote-tracking branch 'origin/FDP-Latest_changes' into psl-fdp-bicepchange
2 parents 8f00a73 + 23c469b commit 9466a21

File tree

11 files changed

+23
-29
lines changed

11 files changed

+23
-29
lines changed

.github/workflows/deploy-waf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
2222
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
2323
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
24-
export GPT_MIN_CAPACITY="50"
24+
export GPT_MIN_CAPACITY="140"
2525
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
2626
2727
chmod +x infra/scripts/checkquota.sh

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ param aiFoundryAiServicesConfiguration aiServicesConfigurationType = {
144144
sku: 'S0'
145145
deployments: null //Default value set on module configuration
146146
subnetResourceId: null //Default value set on module configuration
147-
modelCapacity: 140
147+
modelCapacity: 50
148148
}
149149

150150
// @description('Optional. The configuration to apply for the AI Foundry Storage Account resource.')
@@ -749,7 +749,7 @@ var aiFoundryAiServicesModelDeployment = {
749749
sku: {
750750
name: modelDeploymentType
751751
//Curently the capacity is set to 140 for opinanal performance.
752-
capacity: aiFoundryAiServicesConfiguration.?modelCapacity ?? 140
752+
capacity: aiFoundryAiServicesConfiguration.?modelCapacity ?? 50
753753
}
754754
raiPolicyName: 'Microsoft.Default'
755755
}

src/backend/.env.sample

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ AZURE_AI_PROJECT_ENDPOINT=
1212
AZURE_AI_SUBSCRIPTION_ID=
1313
AZURE_AI_RESOURCE_GROUP=
1414
AZURE_AI_PROJECT_NAME=
15-
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING=
1615
AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o
1716
APPLICATIONINSIGHTS_CONNECTION_STRING=
17+
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=gpt-4o
18+
AZURE_AI_AGENT_ENDPOINT=
1819

19-
20-
BACKEND_API_URL='http://localhost:8000'
21-
FRONTEND_SITE_NAME='http://127.0.0.1:3000'
20+
BACKEND_API_URL=http://localhost:8000
21+
FRONTEND_SITE_NAME=http://127.0.0.1:3000

src/backend/app_config.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def __init__(self):
4949
self.AZURE_AI_SUBSCRIPTION_ID = self._get_required("AZURE_AI_SUBSCRIPTION_ID")
5050
self.AZURE_AI_RESOURCE_GROUP = self._get_required("AZURE_AI_RESOURCE_GROUP")
5151
self.AZURE_AI_PROJECT_NAME = self._get_required("AZURE_AI_PROJECT_NAME")
52-
self.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING = self._get_required(
53-
"AZURE_AI_AGENT_PROJECT_CONNECTION_STRING"
54-
)
52+
self.AZURE_AI_AGENT_ENDPOINT = self._get_required("AZURE_AI_AGENT_ENDPOINT")
5553

5654
# Cached clients and resources
5755
self._azure_credentials = None
@@ -177,10 +175,8 @@ def get_ai_project_client(self):
177175
"Unable to acquire Azure credentials; ensure DefaultAzureCredential is configured"
178176
)
179177

180-
connection_string = self.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING
181-
self._ai_project_client = AIProjectClient.from_connection_string(
182-
credential=credential, conn_str=connection_string
183-
)
178+
endpoint = self.AZURE_AI_AGENT_ENDPOINT
179+
self._ai_project_client = AIProjectClient(endpoint=endpoint, credential=credential)
184180

185181
return self._ai_project_client
186182
except Exception as exc:

src/backend/app_kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from auth.auth_utils import get_authenticated_user_details
1111

1212
# Azure monitoring
13-
from azure.monitor.opentelemetry import configure_azure_monitor
13+
# from azure.monitor.opentelemetry import configure_azure_monitor
1414
from config_kernel import Config
1515
from event_utils import track_event_if_configured
1616

@@ -38,7 +38,7 @@
3838
connection_string = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
3939
if connection_string:
4040
# Configure Application Insights if the Instrumentation Key is found
41-
configure_azure_monitor(connection_string=connection_string)
41+
# configure_azure_monitor(connection_string=connection_string)
4242
logging.info(
4343
"Application Insights configured with the provided Instrumentation Key"
4444
)

src/backend/config_kernel.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class Config:
2626
AZURE_AI_SUBSCRIPTION_ID = config.AZURE_AI_SUBSCRIPTION_ID
2727
AZURE_AI_RESOURCE_GROUP = config.AZURE_AI_RESOURCE_GROUP
2828
AZURE_AI_PROJECT_NAME = config.AZURE_AI_PROJECT_NAME
29-
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING = (
30-
config.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING
31-
)
29+
AZURE_AI_AGENT_ENDPOINT = config.AZURE_AI_AGENT_ENDPOINT
3230

3331
@staticmethod
3432
def GetAzureCredentials():

src/backend/kernel_agents/agent_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ async def _create_azure_ai_agent_definition(
276276
# # First try to get an existing agent with this name as assistant_id
277277
try:
278278
agent_id = None
279-
agent_list = await client.agents.list_agents()
280-
for agent in agent_list.data:
279+
agent_list = client.agents.list_agents()
280+
async for agent in agent_list:
281281
if agent.name == agent_name:
282282
agent_id = agent.id
283283
break

src/backend/kernel_agents/agent_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
# Import the new AppConfig instance
88
from app_config import config
9-
from azure.ai.projects.models import (ResponseFormatJsonSchema,
10-
ResponseFormatJsonSchemaType)
9+
from azure.ai.agents.models import (ResponseFormatJsonSchema,
10+
ResponseFormatJsonSchemaType)
1111
from context.cosmos_memory_kernel import CosmosMemoryContext
1212
from kernel_agents.agent_base import BaseAgent
1313
from kernel_agents.generic_agent import GenericAgent

src/backend/kernel_agents/planner_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import uuid
44
from typing import Any, Dict, List, Optional, Tuple
55

6-
from azure.ai.projects.models import (ResponseFormatJsonSchema,
7-
ResponseFormatJsonSchemaType)
6+
from azure.ai.agents.models import (ResponseFormatJsonSchema,
7+
ResponseFormatJsonSchemaType)
88
from context.cosmos_memory_kernel import CosmosMemoryContext
99
from event_utils import track_event_if_configured
1010
from kernel_agents.agent_base import BaseAgent

src/backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ dependencies = [
2626
"pytest-cov==5.0.0",
2727
"python-dotenv>=1.1.0",
2828
"python-multipart>=0.0.20",
29-
"semantic-kernel>=1.28.1",
29+
"semantic-kernel>=1.32.2",
3030
"uvicorn>=0.34.2",
3131
]

0 commit comments

Comments
 (0)