Skip to content

Commit 3fe694f

Browse files
Merge pull request #268 from microsoft/psl-fdp-bicepchange
feat: FDP Changes
2 parents 2865957 + 0b211d1 commit 3fe694f

File tree

11 files changed

+105
-265
lines changed

11 files changed

+105
-265
lines changed

infra/main.bicep

Lines changed: 85 additions & 236 deletions
Large diffs are not rendered by default.

infra/main.bicepparam

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ param applicationInsightsConfiguration = {
1818
param virtualNetworkConfiguration = {
1919
enabled: false
2020
}
21-
param aiFoundryStorageAccountConfiguration = {
22-
sku: 'Standard_LRS'
23-
}
2421
param webServerFarmConfiguration = {
2522
skuCapacity: 1
2623
skuName: 'B2'

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)