Skip to content

Commit a4fd52d

Browse files
author
Davide Antelmo
committed
fix observability-ai convetions Feb22th breaking changes
1 parent 810e0c5 commit a4fd52d

3 files changed

Lines changed: 6 additions & 22 deletions

File tree

.vscode/launch.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,6 @@
1414
"preLaunchTask": "npm install - banking-web",
1515
"console": "integratedTerminal"
1616
},
17-
18-
{
19-
"name": "DevUI",
20-
"type": "debugpy",
21-
"request": "launch",
22-
"program": "app/main_dev-ui.py",
23-
"env": {
24-
"PROFILE": "dev",
25-
"PYTHONNOUSERSITE": "1"
26-
},
27-
"jinja": true,
28-
"cwd": "${workspaceFolder}/app/backend",
29-
"justMyCode": true
30-
31-
},
3217

3318
{
3419
"name": "DEV - Chatkit Backend App",

app/backend/app/config/container_azure_chat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,21 @@ class Container(containers.DeclarativeContainer):
102102

103103
############# ChatKit based agents and orchestrator #############
104104

105-
#Account Agent with Azure chat based agents. Can be singleton as thread state is passed to the underlying agent run method
106-
account_agent_chatkit = providers.Singleton(
105+
#Account Agent with Azure chat based agents. Must be Factory (not Singleton) so a fresh AzureOpenAIChatClient with valid credentials is created per request.
106+
account_agent_chatkit = providers.Factory(
107107
AccountAgentChatKit,
108108
azure_chat_client=_azure_chat_client,
109109
account_mcp_server_url=f"{settings.ACCOUNT_MCP_URL}/mcp"
110110
)
111111

112-
transaction_agent_chatkit = providers.Singleton(
112+
transaction_agent_chatkit = providers.Factory(
113113
TransactionHistoryAgentChatKit,
114114
azure_chat_client=_azure_chat_client,
115115
account_mcp_server_url=f"{settings.ACCOUNT_MCP_URL}/mcp",
116116
transaction_mcp_server_url=f"{settings.TRANSACTION_MCP_URL}/mcp"
117117
)
118118

119-
payment_agent_chatkit = providers.Singleton(
119+
payment_agent_chatkit = providers.Factory(
120120
PaymentAgentChatKit,
121121
azure_chat_client=_azure_chat_client,
122122
account_mcp_server_url=f"{settings.ACCOUNT_MCP_URL}/mcp",

app/backend/pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ dependencies = [
1919
"agent-framework-devui==1.0.0b260212",
2020
"agent-framework-chatkit==1.0.0b260212",
2121
"openai-chatkit==1.4.1",
22-
"azure-monitor-opentelemetry"
23-
# "azure-monitor-opentelemetry-exporter==1.0.0b46",
24-
# "azure-monitor-opentelemetry==1.8.3"
22+
"azure-monitor-opentelemetry",
23+
"opentelemetry-semantic-conventions-ai==0.4.13"
2524
]
2625

2726
[tool.uv]

0 commit comments

Comments
 (0)