File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ async def init_ai_foundry_client():
170170
171171 ai_project_client = AIProjectClient (
172172 endpoint = app_settings .azure_ai .agent_endpoint ,
173- credential = get_azure_credential ()
173+ credential = await get_azure_credential_async ()
174174 )
175175 track_event_if_configured ("AIFoundryAgentEndpointUsed" , {
176176 "endpoint" : app_settings .azure_ai .agent_endpoint
@@ -1164,7 +1164,7 @@ async def fetch_azure_search_content():
11641164 return jsonify ({"error" : "URL and title are required" }), 400
11651165
11661166 # Get Azure AD token
1167- credential = await get_azure_credential_async ()
1167+ credential = get_azure_credential ()
11681168 token = credential .get_token ("https://search.azure.com/.default" )
11691169 access_token = token .token
11701170
Original file line number Diff line number Diff line change 11from azure .ai .projects .aio import AIProjectClient
22from azure .ai .agents .models import AzureAISearchTool , AzureAISearchQueryType
3- from backend .helpers .azure_credential_utils import get_azure_credential
3+ from backend .helpers .azure_credential_utils import get_azure_credential_async
44from backend .settings import app_settings
55from event_utils import track_event_if_configured
66
@@ -20,7 +20,7 @@ async def create_or_get_agent(cls):
2020 """
2121 project_client = AIProjectClient (
2222 endpoint = app_settings .azure_ai .agent_endpoint ,
23- credential = get_azure_credential (),
23+ credential = await get_azure_credential_async (),
2424 api_version = app_settings .azure_ai .agent_api_version
2525 )
2626
Original file line number Diff line number Diff line change 11from azure .ai .projects .aio import AIProjectClient
22from azure .ai .agents .models import AzureAISearchTool , AzureAISearchQueryType
3- from backend .helpers .azure_credential_utils import get_azure_credential
3+ from backend .helpers .azure_credential_utils import get_azure_credential_async
44from backend .settings import app_settings
55from event_utils import track_event_if_configured
66
@@ -19,7 +19,7 @@ async def create_or_get_agent(cls):
1919 """
2020 project_client = AIProjectClient (
2121 endpoint = app_settings .azure_ai .agent_endpoint ,
22- credential = get_azure_credential (),
22+ credential = await get_azure_credential_async (),
2323 api_version = app_settings .azure_ai .agent_api_version
2424 )
2525
Original file line number Diff line number Diff line change 11from azure .ai .projects .aio import AIProjectClient
22from azure .ai .agents .models import AzureAISearchTool , AzureAISearchQueryType
3- from backend .helpers .azure_credential_utils import get_azure_credential
3+ from backend .helpers .azure_credential_utils import get_azure_credential_async
44from backend .settings import app_settings
55from event_utils import track_event_if_configured
66
@@ -20,7 +20,7 @@ async def create_or_get_agent(cls):
2020 """
2121 project_client = AIProjectClient (
2222 endpoint = app_settings .azure_ai .agent_endpoint ,
23- credential = get_azure_credential (),
23+ credential = await get_azure_credential_async (),
2424 api_version = app_settings .azure_ai .agent_api_version
2525 )
2626
You can’t perform that action at this time.
0 commit comments