File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99from dotenv import load_dotenv
1010
11- from helper .azure_credential_utils import get_azure_credential_async , get_azure_credential
12-
1311from fastapi import FastAPI
1412from fastapi .middleware .cors import CORSMiddleware
1513
14+ from helper .azure_credential_utils import get_azure_credential
15+
1616from semantic_kernel .agents .azure_ai .azure_ai_agent import AzureAIAgent # pylint: disable=E0611
1717
1818from sql_agents .agent_manager import clear_sql_agents , set_sql_agents
Original file line number Diff line number Diff line change 1515import os
1616
1717from azure .identity .aio import ClientSecretCredential
18+
1819from helper .azure_credential_utils import get_azure_credential
1920
2021
Original file line number Diff line number Diff line change 22
33from azure .storage .blob import BlobServiceClient
44
5+ from common .config .config import app_config
56from common .logger .app_logger import AppLogger
67from common .storage .blob_base import BlobStorageBase
8+
79from helper .azure_credential_utils import get_azure_credential
810
9- from common .config .config import app_config
1011
1112class AzureBlobStorage (BlobStorageBase ):
1213 def __init__ (self , account_name : str , container_name : Optional [str ] = None ):
Original file line number Diff line number Diff line change 11import os
2- from azure .identity import ManagedIdentityCredential , DefaultAzureCredential
3- from azure .identity .aio import ManagedIdentityCredential as AioManagedIdentityCredential , DefaultAzureCredential as AioDefaultAzureCredential
2+
3+ from azure .identity import DefaultAzureCredential , ManagedIdentityCredential
4+ from azure .identity .aio import DefaultAzureCredential as AioDefaultAzureCredential , ManagedIdentityCredential as AioManagedIdentityCredential
45
56
67async def get_azure_credential_async (client_id = None ):
@@ -33,4 +34,4 @@ def get_azure_credential(client_id=None):
3334 if os .getenv ("APP_ENV" , "prod" ).lower () == 'dev' :
3435 return DefaultAzureCredential () # CodeQL [SM05139] Okay use of DefaultAzureCredential as it is only used in development
3536 else :
36- return ManagedIdentityCredential (client_id = client_id )
37+ return ManagedIdentityCredential (client_id = client_id )
You can’t perform that action at this time.
0 commit comments