Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/backend/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ AZURE_AI_PROJECT_ENDPOINT=
AZURE_AI_SUBSCRIPTION_ID=
AZURE_AI_RESOURCE_GROUP=
AZURE_AI_PROJECT_NAME=
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING=
AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=gpt-4o
APPLICATIONINSIGHTS_CONNECTION_STRING=
AZURE_AI_AGENT_ENDPOINT=


BACKEND_API_URL='http://localhost:8000'
FRONTEND_SITE_NAME='http://127.0.0.1:3000'
BACKEND_API_URL=http://localhost:8000
FRONTEND_SITE_NAME=http://127.0.0.1:3000
10 changes: 3 additions & 7 deletions src/backend/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ def __init__(self):
self.AZURE_AI_SUBSCRIPTION_ID = self._get_required("AZURE_AI_SUBSCRIPTION_ID")
self.AZURE_AI_RESOURCE_GROUP = self._get_required("AZURE_AI_RESOURCE_GROUP")
self.AZURE_AI_PROJECT_NAME = self._get_required("AZURE_AI_PROJECT_NAME")
self.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING = self._get_required(
"AZURE_AI_AGENT_PROJECT_CONNECTION_STRING"
)
self.AZURE_AI_AGENT_ENDPOINT = self._get_required("AZURE_AI_AGENT_ENDPOINT")

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

connection_string = self.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING
self._ai_project_client = AIProjectClient.from_connection_string(
credential=credential, conn_str=connection_string
)
endpoint = self.AZURE_AI_AGENT_ENDPOINT
self._ai_project_client = AIProjectClient(endpoint=endpoint, credential=credential)

return self._ai_project_client
except Exception as exc:
Expand Down
4 changes: 2 additions & 2 deletions src/backend/app_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from auth.auth_utils import get_authenticated_user_details

# Azure monitoring
from azure.monitor.opentelemetry import configure_azure_monitor
# from azure.monitor.opentelemetry import configure_azure_monitor
from config_kernel import Config
from event_utils import track_event_if_configured

Expand Down Expand Up @@ -38,7 +38,7 @@
connection_string = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
if connection_string:
# Configure Application Insights if the Instrumentation Key is found
#configure_azure_monitor(connection_string=connection_string)
# configure_azure_monitor(connection_string=connection_string)
logging.info(
"Application Insights configured with the provided Instrumentation Key"
)
Expand Down
4 changes: 1 addition & 3 deletions src/backend/config_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class Config:
AZURE_AI_SUBSCRIPTION_ID = config.AZURE_AI_SUBSCRIPTION_ID
AZURE_AI_RESOURCE_GROUP = config.AZURE_AI_RESOURCE_GROUP
AZURE_AI_PROJECT_NAME = config.AZURE_AI_PROJECT_NAME
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING = (
config.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING
)
AZURE_AI_AGENT_ENDPOINT = config.AZURE_AI_AGENT_ENDPOINT

@staticmethod
def GetAzureCredentials():
Expand Down
4 changes: 2 additions & 2 deletions src/backend/kernel_agents/agent_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ async def _create_azure_ai_agent_definition(
# # First try to get an existing agent with this name as assistant_id
try:
agent_id = None
agent_list = await client.agents.list_agents()
for agent in agent_list.data:
agent_list = client.agents.list_agents()
async for agent in agent_list:
if agent.name == agent_name:
agent_id = agent.id
break
Expand Down
4 changes: 2 additions & 2 deletions src/backend/kernel_agents/agent_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# Import the new AppConfig instance
from app_config import config
from azure.ai.projects.models import (ResponseFormatJsonSchema,
ResponseFormatJsonSchemaType)
from azure.ai.agents.models import (ResponseFormatJsonSchema,
ResponseFormatJsonSchemaType)
from context.cosmos_memory_kernel import CosmosMemoryContext
from kernel_agents.agent_base import BaseAgent
from kernel_agents.generic_agent import GenericAgent
Expand Down
4 changes: 2 additions & 2 deletions src/backend/kernel_agents/planner_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import uuid
from typing import Any, Dict, List, Optional, Tuple

from azure.ai.projects.models import (ResponseFormatJsonSchema,
ResponseFormatJsonSchemaType)
from azure.ai.agents.models import (ResponseFormatJsonSchema,
ResponseFormatJsonSchemaType)
from context.cosmos_memory_kernel import CosmosMemoryContext
from event_utils import track_event_if_configured
from kernel_agents.agent_base import BaseAgent
Expand Down
2 changes: 1 addition & 1 deletion src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ dependencies = [
"pytest-cov==5.0.0",
"python-dotenv>=1.1.0",
"python-multipart>=0.0.20",
"semantic-kernel>=1.28.1",
"semantic-kernel>=1.32.2",
"uvicorn>=0.34.2",
]
6 changes: 3 additions & 3 deletions src/backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ opentelemetry-instrumentation-fastapi
opentelemetry-instrumentation-openai
opentelemetry-exporter-otlp-proto-http

semantic-kernel[azure]==1.28.1
azure-ai-projects==1.0.0b10
openai
semantic-kernel[azure]==1.32.2
azure-ai-projects==1.0.0b11
openai==1.84.0
azure-ai-inference==1.0.0b9
azure-search-documents
azure-ai-evaluation
Expand Down
Loading